hugo/docs/content/en/functions/slice.md
2023-05-22 16:47:07 +02:00

591 B

title description categories menu keywords signature relatedfuncs
slice Creates a slice (array) of all passed arguments.
functions
docs
parent
functions
slice
array
interface
slice ITEM...

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

{{< code file="slice.html" >}} {{ $sliceOfStrings := slice "foo" "bar" "buzz" }}

{{ delimit ($sliceOfStrings) ", " }}

{{< /code >}}