strings.HasPrefix
Reports whether the given string begins with the given prefix.
- Syntax
- strings.HasPrefix STRING PREFIX
- Returns
- bool
- Alias
- hasPrefix
Usage
The strings.HasPrefix function reports whether the given string begins with the given prefix.
Examples
{{ strings.HasPrefix "Hugo" "Hu" }} → trueLast updated:
November 8, 2026
:
content: Remove categories from front matter (1cc1dd83a)
Improve this page