1
0
Fork 0
hugo/docs/content/en/functions/strings/TrimSpace.md

562 B

title description categories keywords params
strings.TrimSpace Returns the given string, removing leading and trailing whitespace as defined by Unicode.
functions_and_methods
returnType signatures
string
strings.TrimSpace INPUT

{{< new-in 0.136.3 />}}

Whitespace characters include \t, \n, \v, \f, \r, and characters in the Unicode Space Separator category.

{{ strings.TrimSpace "\n\r\t   foo   \n\r\t" }} → foo