find the index of specific character in string