String-related functions
Defined in: core::strings
str_length
The length of a string.
str_slice
Subslice of a string.
chr
Get a single-character string from a Unicode code point.
ord
Get the Unicode code point of the first character in a string.
lowercase
Convert a string to lowercase.
uppercase
Convert a string to uppercase.
str_append
Concatenate two strings.
str_prepend
Concatenate two strings.
str_find
Find the first occurrence of a substring in a string.
Example
Run this examplestr_contains
Check if a string contains a substring.
Example
Run this examplestr_replace
Replace all occurrences of a substring in a string.
Example
str_replace("statically typed programming language", "scientific calculator", "Numbat is a statically typed programming language.")
= "Numbat is a scientific calculator." [String]
str_repeat
Repeat the input string n times.
base
Convert a number to the given base.
bin
Get a binary representation of a number.
oct
Get an octal representation of a number.
dec
Get a decimal representation of a number.
hex
Get a hexadecimal representation of a number.