HUGO
Menu
GitHub 90272 stars Mastodon

strings.ContainsAny

Reports whether the given string contains any character within the given set.
Syntax
strings.ContainsAny STRING SET
Returns
bool

Usage

The strings.ContainsAny function reports whether the given string contains any character within the given set. The check is case-sensitive.

Examples

{{ strings.ContainsAny "Hugo" "gm" }} → true
{{ strings.ContainsAny "Hugo" "Gm" }} → false