strings.trim() function

The strings.trim() function removes leading and trailing characters specified in the cutset from a string.

Output data type: String

import "strings"

strings.trim(v: ".abc.", cutset: ".")

// returns "abc"



The string value from which to trim characters.

Data type: String


The leading and trailing characters to trim from the string value. Only characters that match the cutset string exactly are trimmed.

Data type: String


Trim leading and trailing periods from all values in a column
import "strings"

  |> map(fn:(r) => strings.trim(v: r.variables, cutset: "."))

This documentation is open source. See a typo? Please, open an issue.

Need help getting up and running? Get Support