...
Lua supports a multiline form of declaring strings where you can start with the string with [[ and end it with ]]. This is analogous to Javascript literal notationdeclaring a multiline string.
Code Block | ||
---|---|---|
| ||
local ALongString=[[ This is a long multiple line string. ]] |
...
Code Block | ||
---|---|---|
| ||
-- A single line comment. --[[ A multiple line comment! ]] |
To find the length of a string we use the # operator:
Code Block | ||
---|---|---|
| ||
local Length = #ALongString |