hugo/docs/content/en/functions/strings/Contains.md
2023-12-04 15:24:01 +01:00

622 B

title description categories keywords action aliases
strings.Contains Reports whether the given string contains the given substring.
aliases related returnType signatures
functions/strings/ContainsAny
functions/strings/ContainsNonSpace
functions/strings/HasPrefix
functions/strings/HasSuffix
functions/collections/In
bool
strings.Contains STRING SUBSTRING
/functions/strings.contains
{{ strings.Contains "Hugo" "go" }} → true

The check is case sensitive:

{{ strings.Contains "Hugo" "Go" }} → false