collections.Delimit
Returns a string by joining the values of the given slice or map with a delimiter.
Syntax
collections.Delimit SLICE|MAP DELIMITER [LAST]
Returns
string
Alias
delimit
Delimit a slice:
{{ $s := slice "b" "a" "c" }}
{{ delimit $s ", " }} → b, a, c
{{ delimit $s ", " " and "}} → b, a and cDelimit a map:
The delimit function sorts maps by key, returning the values.
{{ $m := dict "b" 2 "a" 1 "c" 3 }}
{{ delimit $m ", " }} → 1, 2, 3
{{ delimit $m ", " " and "}} → 1, 2 and 3Last updated:
June 18, 2026
:
Merge commit 'c86d9f4aa8a58931f52df6516f10b67c807505fb' (be780afa7)
Improve this page