Divides str into substrings based on a delimiter, returning an array of
these substrings.
If pattern is a String, then its contents are used as the
delimiter when splitting str. If pattern is a single
space, str is split on whitespace, with leading whitespace and runs of
contiguous whitespace characters ignored.
If pattern is a Regexp, str is divided where the pattern
matches. Whenever the pattern matches a zero-length string, str is split
into individual characters. If pattern contains groups, the
respective matches will be returned in the array as well.
....
Divides str into substrings based on a delimiter, returning an array of
these substrings.
If pattern is a String, then its contents are used as the
delimiter when splitting str. If pattern is a single
space, str is split on whitespace, with leading whitespace and runs of
contiguous whitespace characters ignored.
If pattern is a Regexp, str is divided where the pattern
matches. Whenever the pattern matches a zero-length string, str is split
into individual characters. If pattern contains groups, the
respective matches will be returned in the array as well.
....