For the complete documentation index, see llms.txt. This page is also available as Markdown.

Strings

Methods you can call on any string value with a dot. They never mutate the original string - each returns a new value. String positions are 1-indexed, matching arrays.

string name = "Ada Lovelace"
log name.toUpper()    // "ADA LOVELACE"
log name.split(" ")   // ["Ada", "Lovelace"]

In this section

Regex methods

When you pass a regex value, strings gain regex-aware behaviour:

Method
Result
Description

.match(re)

boolean

Whether the regex matches anywhere.

.findAll(re)

array

All matches.

.replace(re, new)

string

Replace every regex match.

.split(re)

array

Split on the regex.

.match(pattern) with a plain string pattern returns an array of matches. See the regex package for building patterns.

Universal methods

Strings also support the methods shared by all values - .len (a property), .toNum(), .toInt(), .toBool(), .toStr(), .getType(), .clone(), .item(i). See Type & conversion methods.

Last updated