Reference

String

Constructor
Input A text surrounded by single or double quotes.
Output A string containing the text.
Indexing
Input A string and a number representing the index.
Output The character at the specified index.
Substring
Input A string and two numbers representing the start and end indices.
Output The substring from the start index to the end index.
Starts with
Input Two strings.
Output True if the first string starts with the second string. False otherwise.
Ends with
Input Two strings.
Output True if the first string ends with the second string. False otherwise.
Replace
Input A string and two substrings.
Output A new string with all occurrences of the first substring replaced by the second substring.
Uppercase
Input A string.
Output A new string converted to uppercase.
Lowercase
Input A string.
Output A new string converted to lowercase.
Trim
Input A string.
Output A new string with leading and trailing whitespace removed.
Match
Input A string and a regex pattern.
Output True if the string matches the regex pattern. False otherwise.
Length
Input A string.
Output The length of the string.
Concat
Input Two strings.
Output The concatenation of the two strings.
First
Input A string.
Output The first character of the string.
Last
Input A string.
Output The last character of the string.
Init
Input A string.
Output A new string without its last character.
Rest
Input A string.
Output A new string without its first character.
At
Input A string and a number representing the index.
Output The character at the specified index.
Is empty
Input A string.
Output True if the string is empty. False otherwise.
Is not empty
Input A string.
Output True if the string is not empty. False otherwise.
Contains
Input A string and an argument of any type.
Output True if the string contains the argument. False otherwise.
Take
Input A string and a number representing the number of characters.
Output The first n characters of the string.
Drop
Input A string and a number representing the number of characters.
Output A new string without the first n characters.
Remove at
Input A string and a number representing the index.
Output A new string with the character at the specified index removed.
Reverse
Input A string.
Output A new string with its characters in reverse order.
Bytes
Input A string.
Output A list of the string's bytes.
Index of
Input A string and any value.
Output The index of the first occurrence of the value in the list, or -1 if the value is not found.
Pad left
Input A string, a number representing the minimum length, and a string to pad with.
Output A new string padded on the left with the specified padding.
Pad right
Input A string, a number representing the minimum length, and a string to pad with.
Output A new string padded on the right with the specified padding.
Split
Input A string and a separator string.
Output A list of the string's substrings separated by the separator.
Compare
Inputs Two strings.
Output 1 if the first string is bigger than the second. -1 if it is the smaller. 0 if they are equal.