Then also check with if (newRPos < protString.length). Also, is there any guarantee that input.length() is going to be larger than newRPos, as both of those are indexes (i.e. a start index and an end index) not a start and length, and I don't know how substring reacts if the end index is smaller than the start index..
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
Offline 4,043 posts
since Feb 2006