NameSummary
asciiAt Returns the ASCII value of the character at the specified index.
contains Returns true if the string contains the specified substring.
endsWith Returns true if the string ends with the specified suffix.
format Formats the string using the specified format string and arguments.
indexOf Returns the index of the first occurrence of the specified substring, or -1 if not found.
len Returns the number of characters in the string.
repeat Returns a new string with the specified string repeated the specified number of times.
replace Returns a new string with all occurrences of 'old' replaced by 'new'.
split Splits the string into a slice of substrings separated by the specified delimiter.
startsWith Returns true if the string starts with the specified prefix.
toLower Returns a new string with all characters converted to lowercase.
toUpper Returns a new string with all characters converted to uppercase.
trimSpace Returns a new string with leading and trailing white space removed.
fn string.asciiAt(index) -> result<int>
Returns the ASCII value of the character at the specified index.
Parameters
indexThe index of the character to get the ASCII value of.
Returns
result<int>
fn string.contains(substring) -> bool
Returns true if the string contains the specified substring.
Parameters
substringThe substring to search for.
Returns
bool
fn string.endsWith(suffix) -> bool
Returns true if the string ends with the specified suffix.
Parameters
suffixThe suffix to search for.
Returns
bool
fn string.format(format, args) -> result<string>
Formats the string using the specified format string and arguments.
Parameters
formatThe format string.
argsThe arguments to format.
Returns
fn string.indexOf(substring) -> int
Returns the index of the first occurrence of the specified substring, or -1 if not found.
Parameters
substringThe substring to search for.
Returns
int
fn string.len() -> int
Returns the number of characters in the string.
Returns
int
fn string.repeat(count) -> string
Returns a new string with the specified string repeated the specified number of times.
Parameters
countThe number of times to repeat the string.
Returns
fn string.replace(old, new) -> string
Returns a new string with all occurrences of 'old' replaced by 'new'.
Parameters
oldThe substring to be replaced.
newThe substring to replace with.
Returns
fn string.split(delim) -> []string
Splits the string into a slice of substrings separated by the specified delimiter.
Parameters
delimThe substring to split by.
Returns
fn string.startsWith(prefix) -> bool
Returns true if the string starts with the specified prefix.
Parameters
prefixThe prefix to search for.
Returns
bool
fn string.toLower() -> string
Returns a new string with all characters converted to lowercase.
Returns
fn string.toUpper() -> string
Returns a new string with all characters converted to uppercase.
Returns
fn string.trimSpace() -> string
Returns a new string with leading and trailing white space removed.
Returns