String

String manipulation functions.

Field
Returns
Description

Newline

string

Returns the newline character.

Function
Returns
Description

FormatFloat(num: float, decimals: int)

string

Format the float to decimal places.

FormatFromList(value : string, formatter : list)

string

Equivalent to C# string.format(string, List<string>)

Split(value: string, splitter : string | list<string>, removeEmpty=False)

List(string)

Split the string into a list. Can pass in either a string to split on or a list of strings to split on, the last optional param can remove all empty entries.

Join(value: List, separator: string)

string

Join the list into a string.

Substring(value: string, startIndex: int)

string

Substring of string from startIndex.

SubstringWithLength(value: string, startIndex: int, length: int)

Substring of string from startIndex and with given length.

Length(value: string)

int

Length of the string.

Replace(value: string, match: string, with: string)

string

Replace all matches in the string with the replacement.

Contains(value: string, match: string)

bool

If the string contains match.

IndexOf(value: string, item: string)

int

Returns the index of the given string.

StartsWith(value: string, match: string)

bool

If the string starts with match.

EndsWith(value: string, match: string)

bool

If the string ends with match.

Trim(value: string)

string

Trim all whitespace from start and end of string.

Insert(value: string, insert: string, index: int)

string

Insert a string at given index.

Capitalize(value: string)

string

Capitalizes the first letter of the string.

ToUpper(value: string)

string

Returns string in upper case.

ToLower(value: string)

string

Returns string in lower case.

Last updated