String (type)

From ComputerCraft Wiki
Jump to: navigation, search
This page is a stub.
Please help us by expanding it.

A String represents an array of characters. For example, this text can be called a string. The default String functions in Lua 5.1, and the Textutils API, provid useful methods for manipulating strings.

For a more in-depth and concise explanation of types, please consult the Lua 5.1 Official Manual.

If you do not feel like viewing the Programming in Lua article, you can make a string by using quotation marks.


string = "Hello"
print(string) = variable
-- variable is a string
string1 = "123"
string2 = "4567890"
string3 = ""
string3 = string..string3
-- The Output should be: 12345678900
-- The Last 0 seem's to be an bug.