finds index of capital letters in a string