ManiaScript
Script language used in ManiaPlanet
 All Classes Namespaces Files Functions Variables Enumerations Enumerator
Functions
TextLib Namespace Reference

Functions

Real ToReal (Text _Text)
 Returns the Real corresponding to _Text. More...
 
Integer ToInteger (Text _Text)
 Returns the Integer corresponding to _Text. More...
 
Vec3 ToColor (Text _Text)
 Returns the RGB color corresponding to _Text. More...
 
Text SubString (Text _Text, Integer _Start, Integer _Length)
 Returns a substring of _Text. More...
 
Text SubText (Text _Text, Integer _Start, Integer _Length)
 Returns a substring of _Text. More...
 
Integer Length (Text _Text)
 Returns the length of _Text. More...
 
Text ToText (Integer _Integer)
 Returns the Text corresponding to _Integer. More...
 
Text ToText (Real _Real)
 Returns the Text corresponding to _Real. More...
 
Text ToText (Boolean _Boolean)
 Returns the Text corresponding to _Boolean. More...
 
Text ToText (Int3 _Int3)
 Returns the Text corresponding to _Int3. More...
 
Text ToText (Vec3 _Vec3)
 Returns the Text corresponding to _Vec3. More...
 
Text TimeToText (Integer _Time, Boolean _IncludeCentiSeconds)
 Returns the Text corresponding to _Time. More...
 
Text TimeToText (Integer _Time)
 Returns the Text corresponding to _Time. More...
 
Text ColorToText (Vec3 _Color)
 Returns the Text corresponding to _Color. More...
 
Text FormatInteger (Integer Argument1, Integer Argument2)
 
Text ToUpperCase (Text _TextToChange)
 Changes lower case characters to upper case characters. More...
 
Text ToLowerCase (Text _TextToChange)
 Changes upper case characters to lower case characters. More...
 
Boolean CompareWithoutFormat (Text _Text1, Text _Text2, Boolean _IsCaseSensitive)
 Compares texts without taking format characters in account. More...
 
Boolean Find (Text _TextToFind, Text _TextToSearchIn, Boolean _IsFormatSensitive, Boolean _IsCaseSensitive)
 Returns True if the searched text is found in the text to search in. More...
 
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)
 
Text[VoidSplit (Text Argument1, Text Argument2)
 
Text SmartSplit (Text Argument1, Integer Argument2, Integer Argument3, Integer Argument4)
 
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. More...
 

Function Documentation

Text TextLib::ColorToText ( Vec3  _Color)

Returns the Text corresponding to _Color.

Parameters
_Color: The color you want to convert into a text
Boolean TextLib::CompareWithoutFormat ( Text  _Text1,
Text  _Text2,
Boolean  _IsCaseSensitive 
)

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.

Text TextLib::Compose ( Text  Argument1)
Text TextLib::Compose ( Text  Argument1,
Text  Argument2 
)
Text TextLib::Compose ( Text  Argument1,
Text  Argument2,
Text  Argument3 
)
Text TextLib::Compose ( Text  Argument1,
Text  Argument2,
Text  Argument3,
Text  Argument4 
)
Text TextLib::Compose ( Text  Argument1,
Text  Argument2,
Text  Argument3,
Text  Argument4,
Text  Argument5 
)
Text TextLib::Compose ( Text  Argument1,
Text  Argument2,
Text  Argument3,
Text  Argument4,
Text  Argument5,
Text  Argument6 
)
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.

Parameters
_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
Text TextLib::FormatInteger ( Integer  Argument1,
Integer  Argument2 
)
Integer TextLib::Length ( Text  _Text)

Returns the length of _Text.

Parameters
_Text: The text you want the length
Text TextLib::MLEncode ( Text  Argument1)
Text TextLib::Replace ( Text  _Text,
Text  _ToReplace,
Text  _Replacement 
)

Replaces occurences of _ToReplace in _Text with _Replacement.

Parameters
_Text: The text you search in
_ToReplace: The text you want to replace
_Replacement: The text you want to insert
Text TextLib::ReplaceChars ( Text  Argument1,
Text  Argument2,
Text  Argument3 
)
Text TextLib::SmartSplit ( Text  Argument1,
Integer  Argument2,
Integer  Argument3,
Integer  Argument4 
)
Text [Void] TextLib::Split ( Text  Argument1,
Text  Argument2 
)
Text TextLib::StripFormatting ( Text  Argument1)
Text TextLib::SubString ( Text  _Text,
Integer  _Start,
Integer  _Length 
)

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

Parameters
_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::SubText ( Text  _Text,
Integer  _Start,
Integer  _Length 
)

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

Parameters
_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 
)

Returns the Text corresponding to _Time.

Converts a _Time Integer to a Text with the following format :

  • MmSsCc if IncludeCentiSeconds is set to true

MmSs if IncludeCentiSeconds is set to false

Parameters
_Time: The time you want to convert into a Text
_IncludeCentiSeconds: Set IncludeCentiSeconds to True if you wants the CentiSeconds to be displayed in the returned Text
Text TextLib::TimeToText ( Integer  _Time)

Returns the Text corresponding to _Time.

Converts the _Time Integer to a Text with the following format : MmSs

Parameters
_Time: The time you want to convert into a Text
Vec3 TextLib::ToColor ( Text  _Text)

Returns the RGB color corresponding to _Text.

Returns an empty Vec3 if an invalid Text is given

Parameters
_Text: The text you want to convert into a RGB color
Integer TextLib::ToInteger ( Text  _Text)

Returns the Integer corresponding to _Text.

Returns -1 if an invalid Text is given

Parameters
_Text: The text you want to convert into an Integer
Text TextLib::ToLowerCase ( Text  _TextToChange)

Changes upper case characters to lower case characters.

Real TextLib::ToReal ( Text  _Text)

Returns the Real corresponding to _Text.

Returns -1 if an invalid Text is given

Parameters
_Text: The text you want to convert into a Real
Text TextLib::ToText ( Integer  _Integer)

Returns the Text corresponding to _Integer.

Parameters
_Integer: The Integer you want to convert
Text TextLib::ToText ( Real  _Real)

Returns the Text corresponding to _Real.

Parameters
_Real: The Real you want to convert
Text TextLib::ToText ( Boolean  _Boolean)

Returns the Text corresponding to _Boolean.

Parameters
_Boolean: The Boolean you want to convert
Text TextLib::ToText ( Int3  _Int3)

Returns the Text corresponding to _Int3.

Parameters
_Int3: The Int3 you want to convert
Text TextLib::ToText ( Vec3  _Vec3)

Returns the Text corresponding to _Vec3.

Parameters
_Vec3: The Vec3 you want to convert
Text TextLib::ToUpperCase ( Text  _TextToChange)

Changes lower case characters to upper case characters.

Text TextLib::Trim ( Text  Argument1)
Text TextLib::URLEncode ( Text  Argument1)