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 8, 2026
:
content: Improve descriptions and signatures for collections functions (573b8610f)
Improve this page