public static int unescapedIndexOfDot(String identifier){
  int indexof=identifier.indexOf(".");
  if (indexof == -1) {
    return -1;
  }
  for (int i=0; i < identifier.length(); i++) {
    char c=identifier.charAt(i);
    if (c != '.') {
      continue;
    }
    if (i > 0) {
      if (identifier.charAt(i - 1) == '\\') {
        continue;
      }
    }
    return i;
  }
  return -1;
}

public static int unescapedIndexOfDot ( String identifier ) { int indexof = identifier . indexOf ( "." ) ; if ( indexof == - 1 ) { return - 1 ; } for ( int i = 0 ; i < identifier . length ( ) ; i ++ ) { char c = identifier . charAt ( i ) ; if ( c != '.' ) { continue ; } if ( i > 0 ) { if ( identifier . charAt ( i - 1 ) == '\\' ) { continue ; } } return i ; } return - 1 ; }
find the index of an unescaped dot ( . ) character , or return - 1 if none found .
