strings.* slots
26 slots, each with its own page and JSON declaration. See how this reference is built.
| Slot | Description |
|---|---|
strings.builder |
Creates a string builder scope for [strings.builder.append]. |
strings.builder.append |
Appends text to the current [strings.builder] scope. |
strings.byte-count |
Returns the UTF-8 byte length of a string; useful for size checks where multi-byte characters matter. |
strings.capitalize |
Returns the input with its first character upper-cased; remainder is left untouched. |
strings.concat |
Concatenates strings. |
strings.contains |
Returns true if a string contains the specified text. |
strings.ends-with |
Returns true if a string ends with the specified text. |
strings.html-decode |
HTML decodes the specified string. |
strings.html-encode |
HTML encodes the specified string. |
strings.join |
Concatenates the values yielded by the expression, inserting the separator between adjacent items. |
strings.length |
Returns the length of a string. |
strings.matches |
Returns regular expression matches, bounded by the execution deadline when set. |
strings.mixin |
Applies string interpolation from child expressions. |
strings.regex-replace |
Replaces text using a regular expression, bounded by the execution deadline when set. |
strings.replace |
Returns the text with every occurrence of [what] swapped for [with]; pass an empty [with] to strip matches. |
strings.replace-not-of |
Replaces characters not found in the supplied allow-list. |
strings.split |
Splits a string at every occurrence of the separator and returns each segment as an unnamed child node. |
strings.starts-with |
Returns true if a string starts with the specified text. |
strings.substring |
Extracts a portion of a string starting at the given offset and optional length; out-of-range bounds throw. |
strings.to-lower |
Transforms input text to lowercase. |
strings.to-upper |
Transforms input text to uppercase. |
strings.trim |
Trims characters from both ends of the specified string. |
strings.trim-end |
Trims characters from the end of the specified string. |
strings.trim-start |
Trims characters from the start of the specified string. |
strings.url-decode |
URL decodes the specified string. |
strings.url-encode |
URL encodes the specified string. |