Returns the given string's characters in their numeric ASCII representation.
This function will throw an error if the slice length is greater than 8000 characters.
Converts a cardinal (111) number to its ordinal/sequential variation (111th).
See also STNDRD for a function that returns just the suffix.
Takes the given numerical bytes and converts them to a string.
Inserts commas for every third digit of a given number.
Returns the binary bytecode of the given function.
This does not work with functions created in C/C++. An error will be thrown if it is
Returns whether or not the second passed string matches the end of the first.
Splits a string up wherever it finds the given separator.
The function string. Split is an alias of this function, except that function doesn't support using patterns.
See string. Implode for the reverse operation of this function.
Attempts to find the specified substring in a string.
This function uses Lua Patterns by default.
Formats the specified values into the string given.
Returns the time as a formatted string or as a table if no format is given.
Creates a string from a Color variable.
We advise against using this. It may be changed or removed in a future update.
Use either string. sub(str, index, index) or str[index].
Returns char value from the specified index in the supplied string.
Returns extension of the file.
Returns file name and extension.
Returns the path only from a file's path.
We advise against using this. It may be changed or removed in a future update.
This function is removed in Lua versions later than what GMod is currently using. Use string. gmatch instead.
Returns an iterator function that is called for every complete match of the pattern, all sub matches will be passed as to the loop.
Using Patterns, returns an iterator which will return either one value if no capture groups are defined, or any capture group matches.
This functions main purpose is to replace certain character sequences in a string using Patterns.
We advise against using this. It may be changed or removed in a future update.
You really should just use table. concat.
Joins the values of a table together to form a string.
This is the reverse of string. Explode and is functionally identical to table. concat, but with less features.
Interpolates a given string with the given table. This is useful for formatting localized strings.
Escapes special characters for JavaScript in a string, making the string safe for inclusion in to JavaScript strings.
Returns everything left of supplied place of that string.
Counts the number of characters in the string (length). This is equivalent to using the length operator (#).
Changes any upper-case letters in a string to lower-case letters.
This function doesn't work on special non-English UTF-8 characters.
Finds a Pattern in a string.
Converts a "string_likeThis" to a more human-friendly "String like This".
This is used internally by Faceposer and other code to transform flex and bodygroup names to a more friendly format.
Converts a digital filesize to human-readable text.
Formats the supplied number (in seconds) to the highest possible time unit.
Escapes all special characters within a string, making the string safe for inclusion in a Lua pattern.
Repeats a string by the provided number, with an optional separator.
Replaces all occurrences of the supplied second string.
Returns the last n-th characters of the string.
Sets the character at the specific index of the string.
Splits the string into a table of strings, separated by the second argument.
This is an alias of string. Explode, but with flipped arguments.
Returns whether or not the first string starts with the second.
We advise against using this. It may be changed or removed in a future update.
Use string. StartsWith.
Returns whether or not the first string starts with the second. This is a alias of string. StartsWith.
Removes the extension of a path.
Returns a sub-string, starting from the character at position StartPos of the string (inclusive), and optionally ending at the character at position EndPos of the string (also inclusive). If EndPos is not given, the rest of the string is returned.
Fetches a Color type from a string.
Returns given time in "MM:SS" format.
Returns given time in "MM:SS:MS" format.
Splits the string into characters and creates a sequential table of characters.
As a result of the encoding, non-ASCII characters will be split into more than one character in the output table. Each character value in the output table will always be 1 byte.
Removes leading and trailing matches of a string.
Removes leading spaces/characters from a string.
Removes trailing spaces/passed character from a string.
Changes any lower-case letters in a string to upper-case letters.
This function doesn't work on special non-English UTF-8 characters.