Reference
String
Constructor
| Input | A text surrounded by single or double quotes |
| Output | A string containing the text |
Signature
Example
Indexing
| Input | A string and a number representing the index |
| Output | The character at the specified index |
Signature
Example
Substring
| Input | A string and two numbers representing the start and end indices |
| Output | The substring from the start index to the end index |
Signature
Example
Starts with
| Input | Two strings |
| Output | True if the first string starts with the second string. False otherwise. |
Signature
Example
Ends with
| Input | Two strings |
| Output | True if the first string ends with the second string. False otherwise. |
Signature
Example
Replace
| Input | A string, a regex pattern, and a replacement string |
| Output | A new string with all matches of the regex pattern replaced by the replacement string |
Signature
Example
Uppercase
| Input | A string |
| Output | A new string converted to uppercase |
Signature
Example
Lowercase
| Input | A string |
| Output | A new string converted to lowercase |
Signature
Example
Trim
| Input | A string |
| Output | A new string with leading and trailing whitespace removed |
Signature
Example
Match
| Input | A string and a regex pattern |
| Output | True if the string matches the regex pattern. False otherwise. |
Signature
Example
Length
| Input | A string |
| Output | The length of the string |
Signature
Example
Concat
| Input | Two strings |
| Output | The concatenation of the two strings |
Signature
Example
First
| Input | A string |
| Output | The first character of the string |
Signature
Example
Last
| Input | A string |
| Output | The last character of the string |
Signature
Example
Init
| Input | A string |
| Output | A new string without its last character |
Signature
Example
Rest
| Input | A string |
| Output | A new string without its first character |
Signature
Example
At
| Input | A string and a number representing the index |
| Output | The character at the specified index |
Signature
Example
Is empty
| Input | A string |
| Output | True if the string is empty. False otherwise. |
Signature
Example
Is not empty
| Input | A string |
| Output | True if the string is not empty. False otherwise. |
Signature
Example
Contains
| Input | Two strings. |
| Output | True if the first string contains the second string. False otherwise. |
Signature
Example
Take
| Input | A string and a number representing the number of characters |
| Output | The first n characters of the string |
Signature
Example
Drop
| Input | A string and a number representing the number of characters |
| Output | A new string without the first n characters |
Signature
Example
Remove at
| Input | A string and a number representing the index |
| Output | A new string with the character at the specified index removed |
Signature
Example
Reverse
| Input | A string |
| Output | A new string with its characters in reverse order |
Signature
Example
Bytes
| Input | A string |
| Output | A list of the string's bytes |
Signature
Example
Index of
| Input | Two strings. |
| Output | The index of the first occurrence of the second string in the first string, or -1 if not found |
Signature
Example
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 |
Signature
Example
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 |
Signature
Example
Split
| Input | A string and a separator string |
| Output | A list of the string's substrings separated by the separator |
Signature
Example
Compare
| Input | Two strings |
| Output | 1 if the first string is bigger than the second. -1 if it is the smaller. 0 if they are equal. |
Signature
Example
Capitalize
| Input | A string |
| Output | A new string with the first character capitalized |
Signature
Example
Count
| Input | A string and a substring |
| Output | The number of occurrences of the substring in the string. If the substring is empty, returns the length of the string plus one (the number of positions where an empty string can be found). |
Signature
Example
From Bytes
| Input | A list of bytes |
| Output | A string created from the byte list |
Signature
Example
Is Alpha
| Input | A string |
| Output | True if the string contains only letters, false otherwise. |
Signature
Example
Is Alphanumeric
| Input | A string |
| Output | True if the string contains only letters and digits, false otherwise. |
Signature
Example
Is Blank
| Input | A string |
| Output | True if the string is empty or contains only whitespace, false otherwise. |
Signature
Example
Is Lowercase
| Input | A string |
| Output | True if the string is all lowercase, false otherwise. |
Signature
Example
Is Numeric
| Input | A string |
| Output | True if the string contains only digits, false otherwise. |
Signature
Example
Is Uppercase
| Input | A string |
| Output | True if the string is all uppercase, false otherwise. |
Signature
Example
Last Index Of
| Input | A string and a substring |
| Output | The index of the last occurrence of the substring, or -1 if not found |
Signature
Example
Lines
| Input | A string |
| Output | A list of lines in the string |
Signature
Example
Repeat
| Input | A string and a number |
| Output | The string repeated n times |
Signature
Example
Trim Left
| Input | A string |
| Output | A new string with leading whitespace removed |
Signature
Example
Trim Right
| Input | A string |
| Output | A new string with trailing whitespace removed |
Signature
Example