strings.TrimSuffix
Returns the given string, removing the suffix from the end of the string.
Syntax
strings.TrimSuffix SUFFIX STRING
Returns
string
{{ strings.TrimSuffix "a" "aabbaa" }} → aabba
{{ strings.TrimSuffix "aa" "aabbaa" }} → aabb
{{ strings.TrimSuffix "aaa" "aabbaa" }} → aabbaa
Last updated:
March 5, 2025
:
content: Remove "related" array from function and method pages (2fcd21ee5)
Improve this page