Skip to main content

join Function

join produces a string by concatenating all of the elements of the specified list of strings with the specified separator.

Code Block
join(separator, list)

Examples

Code Block
> join("-", ["foo", "bar", "baz"])
"foo-bar-baz"
> join(", ", ["foo", "bar", "baz"])
foo, bar, baz
> join(", ", ["foo"])
foo
  • split performs the opposite operation: producing a list by separating a single string using a given delimiter.