String

From Crumbled World Wiki

LuaStringExampleCode

Class name

string

Functions

return function description
string format( nil a )
string format( nil a, nil b )
string format( nil a, nil b, nil c )
string format( nil a, nil b, nil c, nil d )
rep(int n) generate a string with n copies, that is concatenated together.
string match(string pattern) Return the extracted substring by matching patterns.
string match(string pattern, int index) Return the extracted substring by matching patterns.
int len() Return the length of the string.
string lower() Maker uppercase characters lowercase.
string upper() Maker lowercase characters uppercase.
string sub(int i) Return a substring of the string passed. From character i until the end.
string sub(int i, int j) Return a substring of the string passed. From character i until and including j.
string gmatch(string pattern) Return the extracted substring by matching patterns.
string find(string pattern) Find the first occurrence of the pattern in the string passed.
string find(string pattern, number index) Find the first occurrence of the pattern in the string passed.