HUGO
Menu
GitHub 90415 stars Mastodon

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--" "+-" }} → foo