FUNCTION REFERENCE

strsplit

Split text at delimiters.

Split text at delimiters.

Syntax

c = strsplit(s)

Syntax

c = strsplit(s, delimiter)

Syntax

c = strsplit(s, delimiter, 'CollapseDelimiters', tf)

Returns a 1-by-n cell array of character rows. The default delimiter is any white space (space, \f, \n, \r, \t, \v). delimiter can be text or a cell array of text. Repeated delimiters count as one unless CollapseDelimiters is false. At most 65536 pieces.

Example

c = strsplit('a,b,c', ',')   % c = {'a', 'b', 'c'}

Differences from MATLAB: The DelimiterType option is not supported yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.