Skip to content
DerelictDrone edited this page May 28, 2025 · 5 revisions

Jump to table of contents

String

Number = String:toNumber()

Parses a number from a string (2 ops)

Number = String:toNumber(Number Base)

Parses a number from a string. The argument given is the base. I.e. toNumber(16) will parse hex (2 ops)

String = toChar(Number N)

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 (1 ops)

Number = toByte(String C)

Returns the ASCII code of the 1st character in the string (1 ops)

Number = toByte(String Str, Number Idx)

Returns the ASCII code of the Nth character in the string (1 ops)

String = toUnicodeChar(Number Byte)

Returns a one-character string from it's UNICODE code (5 ops)

Number = toUnicodeByte(String C)

Returns the Unicode code of the 1st character in the string (5 ops)

String = String:index(Number Idx)

Returns Nth letter of the string, formatted as a string (1 ops)

String = String:left(Number Idx)

Returns N amount of characters starting from the leftmost character (1 ops)

String = String:right(Number Idx)

Returns N amount of characters starting from the rightmost character (1 ops)

String = String:sub(Number Start, Number Finish)

Returns a substring, starting at the first number argument and ending at the second (1 ops)

String = String:sub(Number Start)

Returns a substring, starting at the number argument and ending at the end of the string (1 ops)

String = String:upper()

All characters are made uppercase (1 ops)

String = String:lower()

All characters are made lowercase (1 ops)

Number = String:length()

Returns the length of the string (1 ops)

Number = String:unicodeLength()

Returns the unicode length of the string (10 ops)

String = String:repeat(Number Times)

Repeats the input string N times (3 ops)

String = String:trim()

Trims away spaces at the beginning and end of a string (2 ops)

String = String:trimLeft()

Trims away opening spaces on the string (2 ops)

String = String:trimRight()

Trims away spaces at the end of a string (2 ops)

Number = String:findRE(String Pattern)

Returns the 1st occurrence of the string S using REGEX functions, returns 0 if not found (10 ops)

Number = String:findRE(String Pattern, Number 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 (10 ops)

Number = String:find(String Needle)

Returns the 1st occurrence of the string S, returns 0 if not found (6 ops)

Number = String:find(String Needle, Number 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 (6 ops)

String = String:replace(String Needle, String New)

Finds and replaces every occurrence of the first argument with the second argument (8 ops)

String = String:replaceRE(String Pattern, String New)

Finds and replaces every occurrence of the first argument using REGEX with the second argument (12 ops)

Array = String:explode(String Delim)

Splits the string into an array, along the boundaries formed by the string S. See also String.Explode (2 ops)

Array = String:explodeRE(String Delim)

Splits the string into an array, along the boundaries formed by the string pattern S. See also String.Explode (5 ops)

String = String:reverse()

Returns a reversed version of S (6 ops)

String = format(String 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 (3 ops)

Array = String:match(String Pattern)

runs string.match(S, S2) and returns the sub-captures as an array (10 ops)

Array = String:match(String Pattern, Number Position)

runs string.match(S, S2, N) and returns the sub-captures as an array (10 ops)

Table = String:gmatch(String Pattern)

runs string.gmatch(S, S2) and returns the captures in arrays in a table (12 ops)

Table = String:gmatch(String Pattern, Number Position)

runs string.gmatch(S, S2, N) and returns the captures in arrays in a table (12 ops)

String = String:matchFirst(String Pattern)

runs string.match(S, S2) and returns the first match or an empty string if the match failed (10 ops)

String = String:matchFirst(String Pattern, Number Position)

runs string.match(S, S2, N) and returns the first match or an empty string if the match failed (10 ops)

String = toUnicodeChar(...)

Returns the UTF-8 string from the given Unicode code-points (3 ops)

String = toUnicodeChar(Array Args)

Returns the UTF-8 string from the given Unicode code-points (3 ops)

Array = String:toUnicodeByte(Number Startpos, Number Endpos)

Returns the Unicode code-points from the given UTF-8 string (3 ops)

Number = String:unicodeLength(Number Startpos, Number Endpos)

Returns the length of the given UTF-8 string (3 ops)

String = compress(String Plaintext)

Compresses the input string using LZMA compression. See decompress(string) (10 ops)

String = decompress(String Compressed)

Decompresses an LZMA-compressed string. See compress(string) (10 ops)

String = hashCRC(String Text)

Returns a the CRC checksum of the input string. This is not a secure hash function (5 ops)

String = hashMD5(String Text)

Returns the MD5 hash of the input string. This is not a secure hash function; see hashSHA256 (5 ops)

String = hashSHA1(String Text)

Returns the SHA1 hash of the input string. This is not a secure hash function; see hashSHA256 (5 ops)

String = hashSHA256(String Text)

Returns the SHA256 hash of the input string (5 ops)

Expression 2 ⚙️

Getting Started 🕊

Guides (In learning order) 🎓

Tools 🛠️

Click To Expand

Advanced

Beacon 💡

Control 🎛️

Data 💿

Detection 👀

Display 💻

Render 🖌

I/O 🔌

Physics 🚀

Utilities 🛠️

RFID 💳

Wireless 🛜

Gates 🚥

Click To Expand

TBD

Extras 🔭

Clone this wiki locally