collections.In
Reports whether a value exists within the given slice or string.
- Syntax
- collections.In SLICE|STRING VALUE
- Returns
- bool
- Alias
- in
{{ $s := slice "a" "b" "c" }}
{{ in $s "b" }} → true{{ $s := "abc" }}
{{ in $s "b" }} → trueLast updated:
February 14, 2026
:
Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)
Improve this page