I have a function that finds the position of a specific string.
ActionScript Code:
firstPos = string.indexOf(searchText);
lastPos = firstPos+string.width;
But indexOf searches the string and returns the position of the first occurrence.
I know there's a startIndex parameter but I dont know how to use it so that I could go through an entire string.
Like for example: " Hello there little
boy. What's your name
boy?"
How can I get the position of first boy word and then the position of second boy word ?
Thanks in advance.