strsplit
Split string or character vector at specified delimiter
Syntax
Description
splits C
= strsplit(str
,delimiter
)str
at
the delimiters specified by delimiter
.
If str
has consecutive delimiters, with no other characters
between them, then strsplit
treats them as one delimiter.
For example, both strsplit('Hello,world',',')
and
strsplit('Hello,,,world',',')
return the same
output.
specifies additional delimiter options using one or more name-value pair
arguments. For example, to treat consecutive delimiters as separate delimiters,
you can specify C
= strsplit(str
,delimiter
,Name,Value
)'CollapseDelimiters',false
.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2013a