Ran into a problem today when testing a long string using indexOf() to determine existence of a sub string. It seems to fail when the string being checked gets very long, so my question is - is there a length limit to using indexOf()? And if so what is it? And does this also affect other string functions such as replace?
This doesn’t specifically answer your question, but indexOf would become very inefficient scanning large strings, and you would probably be much better off using Regular Expression to scan for a substring.
If you are more specific about what you are trying to find in the string, I’ll post an example of how to use it.
greg.
Hi Greg - thanks for the suggestion. I’ll give regexp a try and come back if I get stuck - in any case it will be interesting to see if I hit the same issue as with indexOf()