Trackmania ManiaScript Reference 2024.9.17.1117
A ManiaScript Reference of the new Trackmania.
|
Standard Text manipulation functions. More...
Functions | |
Real | ToReal (Text _Text) |
Returns the Real corresponding to _Text. | |
Integer | ToInteger (Text _Text) |
Returns the Integer corresponding to _Text. | |
Vec3 | ToColor (Text _Text) |
Returns the RGB color corresponding to _Text. | |
Text | SubString (Text _Text, Integer _Start, Integer _Length) |
Returns a substring of _Text. | |
Text | SubText (Text _Text, Integer _Start, Integer _Length) |
Returns a substring of _Text. | |
Integer | Length (Text _Text) |
Returns the length of _Text. | |
Text | ToText (Integer _Integer) |
Returns the Text corresponding to _Integer. | |
Text | ToText (Real _Real) |
Returns the Text corresponding to _Real. | |
Text | ToText (Boolean _Boolean) |
Returns the Text corresponding to _Boolean. | |
Text | ToText (Int3 _Int3) |
Returns the Text corresponding to _Int3. | |
Text | ToText (Vec3 _Vec3) |
Returns the Text corresponding to _Vec3. | |
Text | TimeToText (Integer _Time) |
Returns the Text corresponding to _Time. | |
Text | TimeToText (Integer _Time, Boolean _IncludeCentiSeconds) |
Returns the Text corresponding to _Time. | |
Text | TimeToText (Integer _Time, Boolean _IncludeCentiSeconds, Boolean _IncludeMilliSeconds) |
Returns the Text corresponding to _Time. | |
Text | ColorToText (Vec3 _Color) |
Returns the Text corresponding to _Color. | |
Text | FormatInteger (Integer _Argument1, Integer _Argument2) |
Text | FormatInteger (Integer _Value, Integer _MinLength, Boolean _WithSeparator) |
Text | FormatRank (Integer _Rank, Boolean _ShortFormat) |
Returns the rank corresponding to a number, formatted according to the locale. ShortFormat: '25k' otherwise '25654th'. | |
Text | FormatReal (Real _Value, Integer _FPartLength, Boolean _HideZeroes, Boolean _HideDot) |
Returns the Text corresponding to a Real. With formatting. | |
Text | ToUpperCase (Text _TextToChange) |
Changes lower case characters to upper case characters. | |
Text | ToLowerCase (Text _TextToChange) |
Changes upper case characters to lower case characters. | |
Text | CloseStyleTags (Text _String) |
Return a string where the previously unclosed $< tags have their $> counterpart. | |
Boolean | CompareWithoutFormat (Text _Text1, Text _Text2, Boolean _IsCaseSensitive) |
Compares texts without taking format characters in account. | |
Boolean | Find (Text _TextToFind, Text _TextToSearchIn, Boolean _IsFormatSensitive, Boolean _IsCaseSensitive) |
Returns True if the searched text is found in the text to search in. | |
Boolean | EndsWith (Text _TextToFind, Text _TextToSearchIn) |
Return True if the Text ends with the TextToFind. | |
Boolean | EndsWith (Text _TextToFind, Text _TextToSearchIn, Boolean _IsFormatSensitive, Boolean _IsCaseSensitive) |
Return True if the Text ends with the TextToFind. | |
Boolean | StartsWith (Text _TextToFind, Text _TextToSearchIn) |
Return True if the Text starts with the TextToFind. | |
Boolean | StartsWith (Text _TextToFind, Text _TextToSearchIn, Boolean _IsFormatSensitive, Boolean _IsCaseSensitive) |
Return True if the Text starts with the TextToFind. | |
Text | Compose (Text _Argument1) |
Text | Compose (Text _Argument1, Text _Argument2) |
Text | Compose (Text _Argument1, Text _Argument2, Text _Argument3) |
Text | Compose (Text _Argument1, Text _Argument2, Text _Argument3, Text _Argument4) |
Text | Compose (Text _Argument1, Text _Argument2, Text _Argument3, Text _Argument4, Text _Argument5) |
Text | Compose (Text _Argument1, Text _Argument2, Text _Argument3, Text _Argument4, Text _Argument5, Text _Argument6) |
Text | MLEncode (Text _Argument1) |
Text | URLEncode (Text _Argument1) |
Text | StripFormatting (Text _Argument1) |
Array< Text > | Split (Text _Separators, Text _Text) |
Splits a given text based on a given separators set. | |
Array< Text > | Split (Text _Separators, Text _Text, Boolean _MergeSeparators) |
Splits a given text based on a given separators set. | |
Text | Join (Text _Separator, Array< Text > _Texts) |
Joins a set of texts with the given separator. | |
Text | Trim (Text _Argument1) |
Text | ReplaceChars (Text _Argument1, Text _Argument2, Text _Argument3) |
Text | Replace (Text _Text, Text _ToReplace, Text _Replacement) |
Replaces occurences of _ToReplace in _Text with _Replacement. | |
Array< Text > | RegexFind (Text _Pattern, Text _Text, Text _Flags) |
Find occurences of the _Pattern in the _Text. | |
Array< Text > | RegexMatch (Text _Pattern, Text _Text, Text _Flags) |
Captures the groups of the _Pattern in the matching _Text. group[0] is the whole pattern match. | |
Text | RegexReplace (Text _Pattern, Text _Text, Text _Flags, Text _Replacement) |
Replace the _Pattern in the matching text with _Replacement. | |
Text | GetTranslatedText (Text _Text) |
Lookup the text in the current translation dictionary. | |
Standard Text manipulation functions.
Returns the Text corresponding to _Color.
_Color | : The color you want to convert into a text |
Compares texts without taking format characters in account.
Returns True if Text1 and Text2 are equal. Format differences are not taken into account. Case differences are taken into account if IsCaseSensitive is set to True.
Return True if the Text ends with the TextToFind.
_TextToFind | : The text you are looking for |
_TextToSearchIn | : The text you are searching in |
Boolean TextLib::EndsWith | ( | Text | _TextToFind, |
Text | _TextToSearchIn, | ||
Boolean | _IsFormatSensitive, | ||
Boolean | _IsCaseSensitive ) |
Return True if the Text ends with the TextToFind.
_TextToFind | : The text you are looking for |
_TextToSearchIn | : The text you are searching in |
_IsFormatSensitive | : True if you want to take Format into account, False elseway |
_IsCaseSensitive | : True if you want to take Case into account, False elseway |
Boolean TextLib::Find | ( | Text | _TextToFind, |
Text | _TextToSearchIn, | ||
Boolean | _IsFormatSensitive, | ||
Boolean | _IsCaseSensitive ) |
Returns True if the searched text is found in the text to search in.
Format is not taken into account if IsFormatSensitive is set to False. Case is not taken into account if IsCaseSensitive is set to False.
_TextToFind | : The text you are looking for |
_TextToSearchIn | : The text you are searching in |
_IsFormatSensitive | : True if you want to take Format into account, False elseway |
_IsCaseSensitive | : True if you want to take Case into account, False elseway |
_Value | : The Integer value you want to convert |
_MinLength | : Minimum number of digits of the number, padded with leading zeroes. (excluding the minus sign) |
_WithSeparator | : Optionally add a thousands separator space. |
Lookup the text in the current translation dictionary.
Lookup the text in the current translation dictionary, and returns the translation, or returns the original text if not found.
Joins a set of texts with the given separator.
_Separator | : The separator to use |
_Texts | : The texts to join. |
Returns the length of _Text.
_Text | : The text you want the length |
Find occurences of the _Pattern in the _Text.
_Pattern | : Pattern is a regular expression, similar to javascript syntax. |
_Text | : |
_Flags | : Flags can be 'g' to find all occurences, 'i' to ignore case, 'm' for multiline mode. |
Captures the groups of the _Pattern in the matching _Text. group[0] is the whole pattern match.
_Pattern | : Pattern is a regular expression, similar to javascript syntax. |
_Text | : |
_Flags | : Flags can be 'i' to ignore case, 'm' for multiline mode. |
Replace the _Pattern in the matching text with _Replacement.
_Pattern | : Pattern is a regular expression, similar to javascript syntax. |
_Text | : |
_Flags | : Flags can be 'g' to find all occurences, 'i' to ignore case, 'm' for multiline mode. |
_Replacement | : |
Replaces occurences of _ToReplace in _Text with _Replacement.
_Text | : The text you search in |
_ToReplace | : The text you want to replace |
_Replacement | : The text you want to insert |
Splits a given text based on a given separators set.
_Separators | : The separators to use |
_Text | : The text to split. |
Splits a given text based on a given separators set.
_Separators | : The separators to use |
_Text | : The text to split. |
_MergeSeparators | : Separator may be repeated between values (default = true) |
Return True if the Text starts with the TextToFind.
_TextToFind | : The text you are looking for |
_TextToSearchIn | : The text you are searching in |
Boolean TextLib::StartsWith | ( | Text | _TextToFind, |
Text | _TextToSearchIn, | ||
Boolean | _IsFormatSensitive, | ||
Boolean | _IsCaseSensitive ) |
Return True if the Text starts with the TextToFind.
_TextToFind | : The text you are looking for |
_TextToSearchIn | : The text you are searching in |
_IsFormatSensitive | : True if you want to take Format into account, False elseway |
_IsCaseSensitive | : True if you want to take Case into account, False elseway |
Returns a substring of _Text.
Returns the substring of _Text beginning at the _Start index, with a length of _Length chars Returns an empty Text if _Start > Text.Length or _Length == 0
_Text | : The text in which we look for the substring |
_Start | : The beginning index of the substring |
_Length | : The length of the substring |
Returns a substring of _Text.
Returns the substring of _Text beginning at the _Start index, with a length of _Length chars Returns an empty Text if _Start > Text.Length or _Length == 0
_Text | : The text in which we look for the substring |
_Start | : The beginning index of the substring |
_Length | : The length of the substring |
Text TextLib::TimeToText | ( | Integer | _Time, |
Boolean | _IncludeCentiSeconds, | ||
Boolean | _IncludeMilliSeconds ) |