Split a string according to Python's split function
str = dojo.trim(str); return (!str.length) ? [] : str.split(/\s+/g);