String Addon

From SolarStrike wiki
Revision as of 23:06, 14 June 2014 by Elverion (talk | contribs) (Protected "String Addon" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
Jump to: navigation, search

explode()

table string.explode(string str, string delim)

Splits string 'str' by delimiter 'delim'. Returns results as a table.


trim()

string string.trim(string str)

"Trim" whitespace off head and tail of string 'str', return result.


random()

string string.random(string type, number length)

Creates a random string based on the given type and with 'length' characters. 'type' should be:

"alnum" Alpha-numeric (both upper and lower case) characters
"letters" Letters only (both upper and lower case)
"numbers" Numeric characters only


toUnicode()

string string.toUnicode(string str)

Attempt to convert the input string 'str' to a wide string.