Strings
Strings are an important component of scripting, as they are used to represent sequences of letters, numbers, and symbols.
Declaring a String
The most common method of declaring strings is to put double quotes ("
) around the characters. The following declaration will cause the variable str
to contain the string Hello world!
:
Combining Strings
Strings can be combined through a method called concatenation. The Lua concatenation syntax is two dots (..
) between the strings, for instance:
Last updated