mirror of
https://github.com/gohugoio/hugo.git
synced 2025-05-03 17:10:11 +03:00
30 lines
641 B
Markdown
30 lines
641 B
Markdown
---
|
|
title: strings.ContainsAny
|
|
description: Reports whether a string contains any character from a given string.
|
|
categories: [functions]
|
|
keywords: []
|
|
menu:
|
|
docs:
|
|
parent: functions
|
|
function:
|
|
aliases: []
|
|
returnType: bool
|
|
signatures: [strings.ContainsAny STRING CHARACTERS]
|
|
relatedFunctions:
|
|
- strings.Contains
|
|
- strings.ContainsAny
|
|
- strings.ContainsNonSpace
|
|
- strings.HasPrefix
|
|
- strings.HasSuffix
|
|
aliases: [/functions/strings.containsany]
|
|
---
|
|
|
|
```go-html-template
|
|
{{ strings.ContainsAny "Hugo" "gm" }} → true
|
|
```
|
|
|
|
The check is case sensitive:
|
|
|
|
```go-html-template
|
|
{{ strings.ContainsAny "Hugo" "Gm" }} → false
|
|
```
|