31
rated 0 times
[
38]
[
7]
/ answers: 1 / hits: 148747
/ 12 Years ago, wed, january 23, 2013, 12:00:00
I would like to get the starting position of the 2nd
occurrence of ABC
with something like this:
var string = XYZ 123 ABC 456 ABC 789 ABC;
getPosition(string, 'ABC', 2) // --> 16
How would you do it?
More From » javascript