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

723 B

title description categories keywords action aliases
strings.TrimRight Returns the given string, removing trailing characters specified in the cutset.
aliases related returnType signatures
functions/strings/Chomp
functions/strings/Trim
functions/strings/TrimLeft
functions/strings/TrimPrefix
functions/strings/TrimSuffix
string
strings.TrimRight CUTSET STRING
/functions/strings.trimright
{{ strings.TrimRight "a" "abba" }} → abb

The strings.TrimRight function converts the arguments to strings if possible:

{{ strings.TrimRight 54 12345 }} → 123 (string)
{{ strings.TrimRight "eu" true }} → tr