public static int skipCQLId(String toParse, int idx) {
    if (idx >= toParse.length()) throw new IllegalArgumentException();

    char c = toParse.charAt(idx);
    if (isCqlIdentifierChar(c)) {
      while (idx < toParse.length() && isCqlIdentifierChar(toParse.charAt(idx))) idx++;
      return idx;
    }

    if (c != '"') throw new IllegalArgumentException();

    while (++idx < toParse.length()) {
      c = toParse.charAt(idx);
      if (c != '"') continue;

      if (idx + 1 < toParse.length() && toParse.charAt(idx + 1) == '\"')
        ++idx; // this is an escaped double quote, skip it
      else return idx + 1;
    }
    throw new IllegalArgumentException();
  }
public static int skipCQLId ( String toParse , int idx ) { if ( idx >= toParse . length ( ) ) throw new IllegalArgumentException ( ) ; char c = toParse . charAt ( idx ) ; if ( isCqlIdentifierChar ( c ) ) { while ( idx < toParse . length ( ) && isCqlIdentifierChar ( toParse . charAt ( idx ) ) ) idx ++ ; return idx ; } if ( c != '"' ) throw new IllegalArgumentException ( ) ; while ( ++ idx < toParse . length ( ) ) { c = toParse . charAt ( idx ) ; if ( c != '"' ) continue ; if ( idx + 1 < toParse . length ( ) && toParse . charAt ( idx + 1 ) == '\"' ) ++ idx ; else return idx + 1 ; } throw new IllegalArgumentException ( ) ; }
Assuming that idx points to the beginning of a CQL identifier in toParse, returns the index of
the first character after this identifier.

@param toParse the string to skip an identifier from.
@param idx the index to start parsing an identifier from.
@return the index ending the CQL identifier starting at {@code idx}.
@throws IllegalArgumentException if idx doesn't point to the start of a valid CQL identifier.