trim
Syntax
trim(input)<string>.trim()Arguments
Examples
trim(" hello ")
// "hello"" hello world ".trim()
// "hello world"$ echo '{"value": " spaced "}' | dasel -i json 'value.trim()'
spacedLast updated
Trims whitespace from both ends of a string.
trim(input)or chained:
<string>.trim()input (string, optional when chained) - The string to trim.
Function call
trim(" hello ")
// "hello"Chained usage
" hello world ".trim()
// "hello world"CLI usage
$ echo '{"value": " spaced "}' | dasel -i json 'value.trim()'
spacedLast updated