add indexof2

todo it doesnt work when a char and the first char of the string are the same.