use char based indexOf calls