mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 20:17:17 +00:00
Clarify split function docs (#1792)
* Clarify split function docs * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Joe Mooring <joe@mooring.com>
This commit is contained in:
1 parent
a079193f19
commit
be87dba80d
1 file changed
+6
-2
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: split
|
title: split
|
||||||
# linktitle: split
|
# linktitle: split
|
||||||
description: splits a string into substrings separated by a delimiter
|
description: Returns an array of strings by splitting STRING by DELIM.
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
lastmod: 2017-02-01
|
||||||
@@ -18,4 +18,8 @@ deprecated: false
|
|||||||
aliases: []
|
aliases: []
|
||||||
---
|
---
|
||||||
|
|
||||||
* `{{split "tag1,tag2,tag3" "," }}` → ["tag1" "tag2" "tag3"]
|
* `{{ split "tag1,tag2,tag3" "," }}` → ["tag1", "tag2", "tag3"]
|
||||||
|
|
||||||
|
{{% note %}}
|
||||||
|
`split` essentially does the opposite of [delimit]({{< ref "functions/delimit" >}}). While `split` creates a slice from a string, `delimit` creates a string from a slice.
|
||||||
|
{{% /note %}}
|
||||||
Reference in new issue
Block a user