Files
opentf/website/docs/configuration/functions/split.html.md
Martin Atkins e7d71995f6 website: Document the remaining "collection" functions
This also renames some of the existing function pages whose source
filenames were not matching the usual naming scheme (.html.md).
2018-10-16 18:47:33 -07:00

672 B

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
functions split function docs-funcs-string-split The split function produces a list by dividing a given string at all occurences of a given separator.

split Function

split produces a list by dividing a given string at all occurences of a given separator.

split(separator, string)

Examples

> split(",", "foo,bar,baz")
[
  "foo",
  "bar",
  "baz",
]
> split(",", "foo")
[
  "foo",
]
> split(",", "")
[
  "",
]
  • join performs the opposite operation: producing a string joining together a list of strings with a given separator.