e2 docs string - wiremod/wire GitHub Wiki
String
= :toNumber()
Parses a number from a string (20 ops)
= :toNumber( Base)
Parses a number from a string. The argument given is the base. I.e. toNumber(16) will parse hex (20 ops)
= toChar()
Returns a one-character string from it's ASCII code, where 32 = argument 1 = 255. An empty string is returned for numbers outside that range (20 ops)
= toByte()
Returns the ASCII code of the 1st character in the string (20 ops)
= toByte(, )
Returns the ASCII code of the Nth character in the string (20 ops)
= toUnicodeChar()
Returns a one-character string from it's UNICODE code (20 ops)
= toUnicodeByte()
Returns the Unicode code of the 1st character in the string (20 ops)
= :index()
Returns Nth letter of the string, formatted as a string (20 ops)
= :left()
Returns N amount of characters starting from the leftmost character (20 ops)
= :right()
Returns N amount of characters starting from the rightmost character (20 ops)
= :sub(, )
Returns a substring, starting at the first number argument and ending at the second (20 ops)
= :sub( Start)
Returns a substring, starting at the number argument and ending at the end of the string (20 ops)
= :upper()
All characters are made uppercase (20 ops)
= :lower()
All characters are made lowercase (20 ops)
= :length()
Returns the length of the string (20 ops)
= :unicodeLength()
Returns the unicode length of the string (20 ops)
= :repeat()
Repeats the input string N times (20 ops)
= :trim()
Trims away spaces at the beginning and end of a string (20 ops)
= :trimLeft()
Trims away opening spaces on the string (20 ops)
= :trimRight()
Trims away spaces at the end of a string (20 ops)
= :findRE( Pattern)
Returns the 1st occurrence of the string S using REGEX functions, returns 0 if not found (20 ops)
= :findRE( Pattern, Start)
Returns the 1st occurrence of the string S starting at N and going to the end of the string using REGEX functions, returns 0 if not found (20 ops)
= :find( Needle)
Returns the 1st occurrence of the string S, returns 0 if not found (20 ops)
= :find( Needle, Start)
Returns the 1st occurrence of the string S starting at N and going to the end of the string, returns 0 if not found (20 ops)
= :replace( Needle, New)
Finds and replaces every occurrence of the first argument with the second argument (20 ops)
= :replaceRE( Pattern, New)
Finds and replaces every occurrence of the first argument using REGEX with the second argument (20 ops)
= :explode( Delim)
Splits the string into an array, along the boundaries formed by the string S. See also String.Explode (5 ops)
= :explodeRE( Delim)
Splits the string into an array, along the boundaries formed by the string pattern S. See also String.Explode (5 ops)
= :reverse()
Returns a reversed version of S (10 ops)
= format( Fmt, ...)
Formats a values exactly like Lua's [http://www.lua.org/manual/5.1/manual.html#pdf-string.format string.format]. Any number and type of parameter can be passed through the "...". Prints errors to the chat area (10 ops)
= :match( Pattern)
runs string.match(S, S2) and returns the sub-captures as an array (10 ops)
= :match( Pattern, Position)
runs string.match(S, S2, N) and returns the sub-captures as an array (10 ops)
= :gmatch( Pattern)
runs string.gmatch(S, S2) and returns the captures in arrays in a table (10 ops)
= :gmatch( Pattern, Position)
runs string.gmatch(S, S2, N) and returns the captures in arrays in a table (10 ops)
= :matchFirst( Pattern)
runs string.match(S, S2) and returns the first match or an empty string if the match failed (10 ops)
= :matchFirst( Pattern, Position)
runs string.match(S, S2, N) and returns the first match or an empty string if the match failed (10 ops)
= toUnicodeChar(...)
Returns the UTF-8 string from the given Unicode code-points (1 ops)
= toUnicodeChar( Args)
Returns the UTF-8 string from the given Unicode code-points (1 ops)
= :toUnicodeByte( Startpos, Endpos)
Returns the Unicode code-points from the given UTF-8 string (1 ops)
= :unicodeLength( Startpos, Endpos)
Returns the length of the given UTF-8 string (1 ops)