mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-10-04 13:06:22 -04:00
768 B
768 B
title | linktitle | description | godocref | date | publishdate | lastmod | categories | tags | ns | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
in | Checks if an element is in an array or slice--or a substring in a string---and returns a boolean. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
false |
in
checks if an element is in an array (or slice) and returns a corresponding boolean value. The elements supported are strings, integers and floats, although only float64 will match as expected.
In addition, in
can also check if a substring exists in a string.
{{ if in .Params.tags "Git" }}Follow me on GitHub!{{ end }}
{{ if in "this string contains a substring" "substring" }}Substring found!{{ end }}