string

Utilities for working with strings

append<value>

Function that concatenates a parameter with an input strings, if they are strings.

Example input:

"bob"

Example patterns:

pattern a = string::append<".json">
pattern b = string::prepend<"my:">

contains<substring>

Function that returns true if the string contains the specified substring.

pattern contains_people = string::contains<"people">

Example input:

"Some people like coffee."

count

Function that produces the length of an input string, if it is a string.

Example input:

"bob"

length

Function that produces the length of an input string, if it is a string.

Example input:

"bob"

prepend<value>

Function that concatenates a parameter with an input strings, if they are strings.

Example input:

"bob"

Example patterns:

pattern a = string::append<".json">
pattern b = string::prepend<"my:">

regexp<regexp>

Function that produces a type that matches strings against a regular expression.

split<pattern>

Function that produces a list of strings split by the specified pattern.

Example pattern:

pattern sp = string::split<",">

Example input:

"1, 2, 3, 4"