strjoin

Returns a string, R, which is the result of concatenating the elements of the cell array of strings, c, with each element separated by the delimiter delim. Delimiter delim is optional and if no value is specified, whitespace is used.

Syntax

R = strjoin(c, delim)

Inputs

c
A cell where all the elements are strings.
Type: cell

Outputs

R
Type: string

Examples

Default delimiter:
R = strjoin({'This', 'is', 'a', 'collection', 'of', 'words'})
R = This is a collection of words
Specific delimiter:
R = strjoin({'This', 'is', 'a', 'collection', 'of', 'words'}, '*')
R = This*is*a*collection*of*words