hugo/docs/content/en/functions/collections/Slice.md
2023-10-20 09:43:56 +02:00

643 B

title linkTitle description categories keywords menu function relatedFunctions aliases
collections.Slice slice Creates a slice (array) of all passed arguments.
functions
docs
parent
functions
aliases returnType signatures
slice
any
collections.Slice ITEM...
collections.Append
collections.Apply
collections.Delimit
collections.In
collections.Reverse
collections.Seq
collections.Slice
/functions/slice

One use case is the concatenation of elements in combination with the [delimit function]:

{{ $s := slice "a" "b" "c" }}
{{ $s }} → [a b c]