Perhaps I am misinterpreting how searchindex() or search() works.
The docs say, “The third argument optionally specifies a starting index.”
Let’s see what I get:
searchindex("Hello, World!", "o")
5
searchindex("Hello, World!", "o", 6)
9
I originally thought that because, in the 2nd case, the search starts at character 6 that the resulting index would be 3. But, that is not the case: the index is always calculated from the beginning of the 1st string argument–only the comparison begins at the position of the 3rd argument.
It works how it works and I can achieve what I need. It would have made more sense, to me at least, if the index was calculated from where the comparison started.