Skip to main content
Version: v1.6.0

trim

Function​

  trim — strip leading and trailing whitespace

Synopsis​

trim(s: string) -> string

Description​

The trim function converts stips all leading and trailing whitespace from string argument s and returns the result.

Examples​

echo '" = Zed = "' | zq -z 'yield trim(this)' -

=>

"= Zed ="