jerseyguy1996:
Interestingly enough the first time through the routine it shows the index of the character 'a' as zero/0 and the second time through the routine it shows the index of the character 'a' as -1. Why in the world would it not always index the first letter in the string to zero????
It is a good idea to read the documentation before using library functions that you are unfamiliar with.