strings.HasSuffix
Reports whether the given string ends with the given suffix.
- Syntax
- strings.HasSuffix STRING SUFFIX
- Returns
- bool
- Alias
- hasSuffix
Usage
The strings.HasSuffix function reports whether the given string ends with the given suffix.
Examples
{{ strings.HasSuffix "Hugo" "go" }} → trueLast updated:
October 28, 2026
:
content: Apply style guide to strings functions (d6de31ebd)
Improve this page