Метод | Описание | |
---|---|---|
@byte ( LuaState luaState, string inputString, uint startPos = 1U, uint endPos = 1U ) : byte[] |
Returns the given string's characters in their numeric ASCII representation.
|
|
@char ( LuaState luaState ) : string |
Takes the given numerical bytes and converts them to a string.
|
|
Comma ( LuaState luaState, double inputNumber ) : string |
Inserts commas for every third digit.
|
|
EndsWith ( LuaState luaState, string inputString, string endString ) : bool |
Returns whether or not the second passed string matches the end of the first.
|
|
FormattedTime ( LuaState luaState, double @float, string format ) : string |
Returns the time as a formatted string or as a table if no format is given.
|
|
GetExtensionFromFilename ( LuaState luaState, string fileName ) : string |
Returns extension of the file.
|
|
GetFileFromFilename ( LuaState luaState, string fileName ) : string |
Returns file name and extension.
|
|
GetPathFromFilename ( LuaState luaState, string fileName ) : string |
Returns the path only from a file's path.
|
|
JavascriptSafe ( LuaState luaState, string inputString ) : string |
Escapes special characters for JavaScript in a string, making the string safe for inclusion in to JavaScript strings.
|
|
Left ( LuaState luaState, string inputString, uint num ) : string |
Returns everything left of supplied place of inputString.
|
|
NiceSize ( LuaState luaState, uint bytes ) : string |
Converts supplied number into bytes.
|
|
NiceTime ( LuaState luaState, uint seconds ) : string |
Converts supplied number into string.
|
|
PatternSafe ( LuaState luaState, string inputString ) : string |
Escapes all special characters within a string, making the string safe for inclusion in a Lua pattern.
|
|
Replace ( LuaState luaState, string input, string find, string replace ) : string |
Replaces all occurrences of the supplied second string.
|
|
Right ( LuaState luaState, string inputString, uint num ) : string |
Returns the last n-th characters of the string.
|
|
SetChar ( LuaState luaState, string inputString, uint index, char replacement ) : string |
Sets the character at the specific index of the string.
|
|
StartWith ( LuaState luaState, string inputString, string startString ) : bool |
Returns whether or not the first string starts with the second.
|
|
StripExtension ( LuaState luaState, string fileName ) : string |
Removes the extension of a path.
|
|
ToMinutesSeconds ( LuaState luaState, uint time ) : string |
Returns the given time in "MM:SS" format.
|
|
ToMinutesSecondsMilliseconds ( LuaState luaState, double time ) : string |
Returns the given time in "MM:SS:MS" format.
|
|
Trim ( LuaState luaState, string inputString, string match = " " ) : string |
Removes leading and trailing matches of a string.
|
|
TrimLeft ( LuaState luaState, string inputString, string match = " " ) : string |
Removes leading spaces/characters from a string.
|
|
TrimRight ( LuaState luaState, string inputString, string match = " " ) : string |
Removes trailing spaces/passed character from a string.
|
|
find ( LuaState luaState, string hayStack, string needle, int startPos = 1, bool noPatterns = false ) : int>.Tuple |
Attempts to find the specified substring in a string, uses
|
|
find ( LuaState luaState, int &start, int &end, string hayStack, string needle, int startPos = 1, bool noPatterns = false ) : void |
Attempts to find the specified substring in a string, uses
|
|
format ( LuaState luaState, string inputString ) : string |
Formats the specified values into the string given.
|
|
gsub ( LuaState luaState, string input, string pattern, string replacement, uint maxReplaces = default(uint) ) : uint>.Tuple |
This functions main purpose is to replace certain character sequences in a string using
|
|
gsub ( LuaState luaState, string &replaceResult, uint &replaceCount, string input, string pattern, string replacement, uint maxReplaces = default(uint) ) : void |
This functions main purpose is to replace certain character sequences in a string using
|
|
len ( LuaState luaState, string inputString ) : uint |
Counts the number of characters in the string (length).
|
|
lower ( LuaState luaState, string inputString ) : string |
Changes any upper-case letters in a inputString to lower-case letters.
|
|
match ( LuaState luaState, string inputString, string pattern, int startPosition ) : string |
Finds a http://wiki.garrysmod.com/page/Patterns">pattern in a |
|
rep ( LuaState luaState, string inputString, uint repetitions ) : string |
Repeats a string by the given value.
|
|
reverse ( LuaState luaState, string inputString ) : string |
Reverses a string.
|
|
sub ( LuaState luaState, string inputString, uint startPos, uint endPos = default(uint) ) : string |
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.
|
|
upper ( LuaState luaState, string inputString ) : string |
Changes any lower-case letters in a string to upper-case letters.
|
public static @byte ( LuaState luaState, string inputString, uint startPos = 1U, uint endPos = 1U ) : byte[] | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to get the chars from. |
startPos | uint | The first character of the string to get the byte of. |
endPos | uint | The last character of the string to get the byte of. |
Результат | byte[] |
public static @char ( LuaState luaState ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
Результат | string |
public static Comma ( LuaState luaState, double inputNumber ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputNumber | double | The input number to commafy. |
Результат | string |
public static EndsWith ( LuaState luaState, string inputString, string endString ) : bool | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string whose end is to be checked. |
endString | string | The string to be matched with the end of the first. |
Результат | bool |
public static FormattedTime ( LuaState luaState, double @float, string format ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
@float | double | |
format | string | An optional formatting to use. If no format it specified, a table will be returned instead. |
Результат | string |
public static GetExtensionFromFilename ( LuaState luaState, string fileName ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
fileName | string | String e.g. file-path to get the file extensions from. |
Результат | string |
public static GetFileFromFilename ( LuaState luaState, string fileName ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
fileName | string | The string e.g. file-path to get the file-name from. |
Результат | string |
public static GetPathFromFilename ( LuaState luaState, string fileName ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
fileName | string | String to get path from. |
Результат | string |
public static JavascriptSafe ( LuaState luaState, string inputString ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string that should be escaped. |
Результат | string |
public static Left ( LuaState luaState, string inputString, uint num ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to extract from. |
num | uint | Amount of chars relative to the beginning (starting from 1). |
Результат | string |
public static NiceSize ( LuaState luaState, uint bytes ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
bytes | uint | The number to convert into bytes. |
Результат | string |
public static NiceTime ( LuaState luaState, uint seconds ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
seconds | uint | The number to convert into string. |
Результат | string |
public static PatternSafe ( LuaState luaState, string inputString ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to be sanitized. |
Результат | string |
public static Replace ( LuaState luaState, string input, string find, string replace ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
input | string | The string we are seeking to replace an occurrence(s). |
find | string | What we are seeking to replace. |
replace | string | What to replace find with. |
Результат | string |
public static Right ( LuaState luaState, string inputString, uint num ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to extract from. |
num | uint | Amount of chars relative to the end (starting from 1). |
Результат | string |
public static SetChar ( LuaState luaState, string inputString, uint index, char replacement ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The input string. |
index | uint | The character index, 1 is the first from left. |
replacement | char | String to replace with. |
Результат | string |
public static StartWith ( LuaState luaState, string inputString, string startString ) : bool | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | String to check. |
startString | string | String to check with. |
Результат | bool |
public static StripExtension ( LuaState luaState, string fileName ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
fileName | string | The path to change. |
Результат | string |
public static ToMinutesSeconds ( LuaState luaState, uint time ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
time | uint | Time in seconds. |
Результат | string |
public static ToMinutesSecondsMilliseconds ( LuaState luaState, double time ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
time | double | Time in seconds. |
Результат | string |
public static Trim ( LuaState luaState, string inputString, string match = " " ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to trim. |
match | string | String to match. |
Результат | string |
public static TrimLeft ( LuaState luaState, string inputString, string match = " " ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | String to trim. |
match | string | Character to remove. |
Результат | string |
public static TrimRight ( LuaState luaState, string inputString, string match = " " ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | String to remove from. |
match | string | Character to remove. |
Результат | string |
public static find ( LuaState luaState, string hayStack, string needle, int startPos = 1, bool noPatterns = false ) : int>.Tuple |
||
luaState | LuaState | Pointer to lua_State struct. |
hayStack | string | The string to search in. |
needle | string | The string to find, can contain patterns if enabled. |
startPos | int | /// The position to start the search from, can be negative start position will be relative to the /// end position. /// |
noPatterns | bool | Set to true to disable patterns. |
Результат | int>.Tuple |
public static find ( LuaState luaState, int &start, int &end, string hayStack, string needle, int startPos = 1, bool noPatterns = false ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
start | int | Starting position of the found text. |
end | int | Ending position of found text. |
hayStack | string | The string to search in. |
needle | string | The string to find, can contain patterns if enabled. |
startPos | int | /// The position to start the search from, can be negative start position will be relative to the /// end position. /// |
noPatterns | bool | Set to true to disable patterns. |
Результат | void |
public static format ( LuaState luaState, string inputString ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to be formatted.
/// |
Результат | string |
public static gsub ( LuaState luaState, string input, string pattern, string replacement, uint maxReplaces = default(uint) ) : uint>.Tuple |
||
luaState | LuaState | Pointer to lua_State struct. |
input | string | String which should be modified. |
pattern | string | The pattern that defines what should be matched and eventually be replaced. |
replacement | string |
/// In case of a string the matches sequence will be replaced with it.
/// |
maxReplaces | uint | Maximum number of replacements to be made. |
Результат | uint>.Tuple |
public static gsub ( LuaState luaState, string &replaceResult, uint &replaceCount, string input, string pattern, string replacement, uint maxReplaces = default(uint) ) : void | ||
luaState | LuaState | Pointer to lua_State struct. |
replaceResult | string | Replaced string. |
replaceCount | uint | Number of replaces. |
input | string | String which should be modified. |
pattern | string | The pattern that defines what should be matched and eventually be replaced. |
replacement | string |
/// In case of a string the matches sequence will be replaced with it.
/// |
maxReplaces | uint | Maximum number of replacements to be made. |
Результат | void |
public static len ( LuaState luaState, string inputString ) : uint | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to find the length of. |
Результат | uint |
public static lower ( LuaState luaState, string inputString ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to convert. |
Результат | string |
public static match ( LuaState luaState, string inputString, string pattern, int startPosition ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | String which should be searched in for matches. |
pattern | string | The pattern that defines what should be matched. |
startPosition | int | /// The start index to start the matching from, can be negative to start the match from a /// position relative to the end. /// |
Результат | string |
public static rep ( LuaState luaState, string inputString, uint repetitions ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to repeat. |
repetitions | uint | How many times to repeat. |
Результат | string |
public static reverse ( LuaState luaState, string inputString ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to be reversed. |
Результат | string |
public static sub ( LuaState luaState, string inputString, uint startPos, uint endPos = default(uint) ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string you'll take a sub-string out of. |
startPos | uint | The position of the first character that will be included in the sub-string. |
endPos | uint | The position of the last character to be included in the sub-string. |
Результат | string |
public static upper ( LuaState luaState, string inputString ) : string | ||
luaState | LuaState | Pointer to lua_State struct. |
inputString | string | The string to convert. |
Результат | string |