If you want to split a string based on another string, this how you do it:
str.split(" ");
If you want to split a string based on a reges, this how you do it:
str.split(/\s/);
\s is a reges which is used for any space character like space,\n,\t or \r.
Showing posts with label split. Show all posts
Showing posts with label split. Show all posts
Thursday, February 10, 2011
Subscribe to:
Posts (Atom)