int length = length(); int matchLength = match.length();  if (matchLength <= 0) return -1; else if (head < 0) return -1;  int end = length - matchLength; char first = match.charAt(0);  loop: for (; head <= end; head++) { if (charAt(head) != first) continue;  for (int i = 1; i < matchLength; i++) { if (charAt(head + i) != match.charAt(i)) continue loop; }  return head; }  return -1;
return indexOf(match, 0);
  public int indexOf(CharSequence match, int head)  {    int length = length();    int matchLength = match.length();    if (matchLength <= 0)      return -1;    else if (head < 0)      return -1;        int end = length - matchLength;    char first = match.charAt(0);    loop:    for (; head <= end; head++) {      if (charAt(head) != first)	continue;      for (int i = 1; i < matchLength; i++) {	if (charAt(head + i) != match.charAt(i))	  continue loop;      }      return head;    }    return -1;  }