Standard.String

Standard.String is a library of functions for working with strings.

Contents

Functions

Standard.String.CharAt

Description

Returns the character at the specified index in a string.

Syntax

CharAt(string, index)

Parameters

string - The string to return a character from. index - The index of the character to return.

Return Value

The character at the specified index in the string.

Example

CharAt("Hello World", 6)
W

Standard.String.CharCodeAt

Description

Returns the Unicode value of the character at the specified index in a string.

Syntax

CharCodeAt(string, index)

Parameters

string - The string to return a character from. index - The index of the character to return.

Return Value

The Unicode value of the character at the specified index in the string.

Example

CharCodeAt("Hello World", 6)
87

Standard.String.Concat

Description

Combines two or more strings into one string.

Syntax

Concat(string1, string2, ...)

Parameters

string1 - The first string to combine. string2 - The second string to combine. ... - Additional strings to combine.

Return Value

A string that is the result of combining the specified strings.

Example

Concat("Hello,", " ", "World")
Hello, World

Standard.String.IndexOf

Description

Returns the index of the first occurrence of a specified value in a string.

Syntax

IndexOf(string, value)

Parameters

string - The string to search. value - The value to search for.

Return Value

The index of the first occurrence of the specified value in the string.

#### Example

IndexOf("Hello World", "World")
6

IndexOf("Hello World", "Earth")
-1

Standard.String.LastIndexOf

Description

Returns the index of the last occurrence of a specified value in a string.

Syntax

LastIndexOf(string, value)

Parameters

string - The string to search. value - The value to search for.

Return Value

The index of the last occurrence of the specified value in the string.

Example

LastIndexOf("Hello World", "o")
7

LastIndexOf("Hello World", "Earth")
-1

Standard.String.Length

Description

Returns the length of a string.

Syntax

Length(string)

Parameters

string - The string to return the length of.

Return Value

The length of the string.

Example

Length("Hello World")
11

Standard.String.Split

Description

Splits a string into an array of substrings.

Syntax

Split(string, separator)

Parameters

string - The string to split. separator - The character or characters to use to split the string.

Return Value

A list of strings that are the substrings of the specified string.

Example

Split("Hello World", " ")
["Hello", "World"]

Notes

Last updated