Squiggle logoSquiggle
API

String

Functions for working with strings in Squiggle

Strings support all JSON escape sequences, with addition of escaped single-quotes (for single-quoted strings).

a = "'\" NUL:\u0000"
b = '\'" NUL:\u0000'

make

Converts any value to a string. Some information is often lost. When a number or date is formatted, the format string is optional. This would use d3-format or d3-time-format respectively.

Signatures
String.make(any) => String
String.make(Number, String) => String
String.make(Date, String) => String

concat

Namespace optional
Signatures
String.concat(String, String) => String
String.concat(String, any) => String

add

infix: +
Namespace optional
Signatures
String.add(String, String) => String
String.add(String, any) => String

split

Signatures
String.split(String, String) => List(String)

On this page