str collect

Concatenate multiple strings into a single string, with an optional separator between each

Signature

> str collect (separator)

Parameters

  • separator: optional separator to use when creating string

Examples

Create a string from input

> ['nu', 'shell'] | str collect

Create a string from input with a separator

> ['nu', 'shell'] | str collect '-'