1
0
Fork 0
hugo/docs/content/en/functions/strings/Contains.md

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