Skip to content

trim

trim(string) → string · String

Remove whitespace from both ends of a string.

  • string (required): the string to trim
utlx
trim("   hello   ")                      // "hello"

// Use case: clean up CSV values
map($input, (row) -> mapValues(row, (v) -> if (isString(v)) trim(v) else v))

Released under AGPL-3.0.