Methods are called with dot syntax: str.method(args).
Returns the number of characters.
let n = "hello".length() // 5
Returns the character at a given index. Negative indices count from the end.
let ch = "hello".at(0) // "h"
let ch = "hello".at(-1) // "o"
Returns a substring from start (inclusive) to end (exclusive). Negative indices count from the end. end defaults to the length of the string.
let s = "hello world".slice(6, 11) // "world"
let s = "hello".slice(1) // "ello"
Splits the string by a delimiter and returns a List<String>.
let parts = "a,b,c".split(",") // ["a", "b", "c"]
Parses the string as an integer.
let n = "42".toInteger() // 42
Parses the string as a float.
let f = "3.14".toFloat()