mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-03 20:22:38 +00:00
648 B
648 B
title, linkTitle, description, keywords, menu, function, relatedFunctions, aliases
| title | linkTitle | description | keywords | menu | function | relatedFunctions | aliases | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| collections.In | in | Reports whether an element is in an array or slice, or if a substring is in a string. |
|
|
|
|
{{ $s := slice "a" "b" "c" }}
{{ in $s "b" }} → true
{{ $s := slice 1 2 3 }}
{{ in $s 2 }} → true
{{ $s := slice 1.11 2.22 3.33 }}
{{ in $s 2.22 }} → true
{{ $s := "abc" }}
{{ in $s "b" }} → true