str join

For strings.

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

Command Type

built-in

Signature

> str join {flags} (separator)

Parameters

  • separator: Optional separator to use when creating string.

Input/output types:

input output
list<any> string
string string

Examples

Create a string from input.

> ['nu', 'shell'] | str join
nushell

Create a string from input with a separator.

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

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.