[javascript] How do I split a string, breaking at a particular character?