code: public static int indexOf(CharSequence str, char ch)
  	{
  		for(int i=0; i<str.length(); i++)
  			if(str.charAt(i) == ch)
  				return i;
  		return -1;
  	}
docs: Find index of first occurance of a character. This is different
  from {@link String#indexOf(String)} in that it works on
  {@link CharSequence}s and looks for a single character
  instead of a string.
  @param str haystack
  @param ch needle
  @return position of needle in haystack or -1 if not found.