String Addon: Difference between revisions
From SolarStrike wiki
Jump to navigationJump to search
m Protected "String Addon" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
== explode | == explode == | ||
'''table string.explode(string str, string delim)''' | '''table string.explode(string str, string delim)''' | ||
| Line 5: | Line 5: | ||
== trim | == trim == | ||
'''string string.trim(string str)''' | '''string string.trim(string str)''' | ||
| Line 11: | Line 11: | ||
== random | == random == | ||
'''string string.random(string type, number length)''' | '''string string.random(string type, number length)''' | ||
| Line 29: | Line 29: | ||
== toUnicode | == toUnicode == | ||
'''string string.toUnicode(string str)''' | '''string string.toUnicode(string str)''' | ||
Attempt to convert the input string 'str' to a wide string. | Attempt to convert the input string 'str' to a wide string. | ||
Revision as of 03:50, 18 February 2015
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.