Difference between revisions of "String Addon"

From SolarStrike wiki
Jump to: navigation, search
(Created page with "== explode() == '''table string.explode(string str, string delim)''' Splits string 'str' by delimiter 'delim'. Returns results as a table. == trim() == '''string string.tri...")
 
m (Protected "String Addon" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(No difference)

Revision as of 23:06, 14 June 2014

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.