I have a function which parses time strings, formatted as hh:mm (for example 18:45). Hours and minutes can be divided by colon, a blank space (18 45) or a comma (18,45).
The following variables split the time string if a colon is used:
var hourstart = parseInt(ini.substr(0, ini.indexOf(':')));
var minutestart = parseInt(ini.substr(ini.indexOf(":") + 1));
How can I make them work also when a blank space or a comma is used? I tried with:
ini.indexOf(':'||' '||',')
but it does not work.