Split a String into pieces.
Syntax
Parameters
subject
- The String to split.limit
- The optional limit
parameter is only in effect if separator
is a String. If so, subject
will be split into a maximum of limit
elements, with the last element containing the remainder of the String. If limit
is negative, all components except the last number specified by limit
are returned.
Result
subject
.
Returns an Array of Strings, produced by splitting subject
on boundaries formed by separator
, or of length separator
if separator
is a Number.