strings.Contains
Reports whether the given string contains the given substring.
- Syntax
- strings.Contains STRING SUBSTRING
- Returns
- bool
Usage
The strings.Contains function reports whether the given string contains the given substring. The check is case-sensitive.
Examples
{{ strings.Contains "Hugo" "go" }} → true
{{ strings.Contains "Hugo" "Go" }} → falseLast updated:
October 28, 2026
:
content: Apply style guide to strings functions (d6de31ebd)
Improve this page