trim
Removes spaces, tabs and line breaks from both ends of the text.
Keyboard Maestro: trim
Details #
trim(text) takes exactly one argument and returns text without leading or trailing whitespace (spaces, tabs and newlines). Whitespace in the middle stays.
Parameters #
Takes 1 argument.
{{ trim(text) }}
Examples #
trim(" hi there \n")→
hi therelength(trim(raw))→
3| Sample variable | Value |
|---|---|
raw | abc |
Gotchas #
The
\nin an expression text is a line break. Other backslash pairs drop the backslash, so write"\\"for one backslash.