Splits str on each occurrence of delim. collapse indicates whether to collapse consecutive occurrences to a single one to prevent producing empty slices.
array to put the resulting slices
input string
delimiter character
maximum number of slices; set to 0 to indicate no limit
the resulting slices
See Implementation
Splits str on each occurrence of delim. collapse indicates whether to collapse consecutive occurrences to a single one to prevent producing empty slices.