strings.Trim
Returns the given string, removing leading and trailing characters specified in the cutset.
- Syntax
- strings.Trim STRING CUTSET
- Returns
- string
- Alias
- trim
Usage
The strings.Trim function returns the given string, removing leading and trailing characters specified in the cutset.
Examples
{{ strings.Trim "++foo--" "+-" }} → fooLast updated:
October 28, 2026
:
content: Apply style guide to strings functions (d6de31ebd)
Improve this page