public static int findNextUnescaped(char charToFind,int startIdx,String s){
  if (startIdx >= s.length())   return -1;
  char[] charArray=s.toCharArray();
  for (int i=startIdx; i < charArray.length; ++i) {
    if (i > 0 && charArray[i - 1] == '\\')     continue;
    if (charArray[i] == charToFind) {
      return i;
    }
  }
  return -1;
}

public static int findNextUnescaped ( char charToFind , int startIdx , String s ) { if ( startIdx >= s . length ( ) ) return - 1 ; char [ ] charArray = s . toCharArray ( ) ; for ( int i = startIdx ; i < charArray . length ; ++ i ) { if ( i > 0 && charArray [ i - 1 ] == '\\' ) continue ; if ( charArray [ i ] == charToFind ) { return i ; } } return - 1 ; }
find the index of the next unescapped ( using backslash ) character
