mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-30 23:50:04 +03:00
693 B
693 B
title | description | categories | keywords | params | aliases | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strings.Split | Returns a slice of strings by splitting the given string by a delimiter. |
|
|
Examples:
{{ split "tag1,tag2,tag3" "," }} → ["tag1", "tag2", "tag3"]
{{ split "abc" "" }} → ["a", "b", "c"]
Note
The
strings.Split
function essentially does the opposite of thecollections.Delimit
function. Whilesplit
creates a slice from a string,delimit
creates a string from a slice.