Browse the docs

string

Turns any value into text.

Details #

string(value) takes exactly one argument and returns text, the same way a value reads inside {{ }}.

  • Numbers without a fractional part have no decimal point: string(3) is 3.

  • true and false become true and false.

  • Nothing (null) becomes empty text.

  • Lists and records become compact JSON with sorted keys.

Parameters #

Takes 1 argument. {{ string(text) }}

Examples #

string(3) + "x"
→ 3x
string(items)
→ [1,"a"]
Sample variableValue
items[1, "a"]
length(string(12345))
→ 5