✏️Strings
Auxiliary functions for String types.
Trim
MTools.String.Trim(string);
Name
Type
Description
string
string
String/Word
Allows you to cut off unnecessary skips at the beginning and at the end. Example usage:
print(MTools.String.Trim(" Hello "));
-- Returns the word 'Hello'.
FirstUpper
MTools.String.FirstUpper(string);
Name
Type
Description
string
string
String/Word
Allows you to make the first letter of a line large. Example usage:
print(MTools.String.FirstUpper("hello"));
-- Returns the word 'Hello'.
FirstLower
MTools.String.FirstLower(string);
Name
Type
Description
string
string
String/Word
Allows you to make the first letter of a line small.
Example of use:
print(MTools.String.FirstLower("HELLO"));
-- Returns the word 'hELLO'.
Cut
MTools.String.Cut(string, number);
Name
Type
Description
string
string
The line that needs to be trimmed
number
number
If positive, then from the beginning; if negative, then from the end
Allows you to trim a line.
Example of use:
print(MTools.String.Cut("MonyTools", 1));
-- Returns "onyTools".
print(MTools.String.Cut("MonyTools", -1));
-- Returns "MonyTool".
Last updated