There’s a second parameter which controls the starting position of search:
String.prototype.indexOf(arg, startPosition);
So you can do
str.indexOf('s', start_index);
There’s a second parameter which controls the starting position of search:
String.prototype.indexOf(arg, startPosition);
So you can do
str.indexOf('s', start_index);