/** * Returns the case canonical version of the given code-unit. ECMAScript 5 * explicitly says that code-units are to be treated as their code-point * equivalent, even surrogates. */ public static char caseCanonicalize(char ch) { if (ch < 0x80) { // Normal case. return ('A' <= ch && ch <= 'Z') ? (char) (ch | 32) : ch; } // Non-ASCII case. if (CASE_SENSITIVE.contains(ch)) { for (DeltaSet ds : CANON_DELTA_SETS) { if (ds.codeUnits.contains(ch)) { return (char) (ch - ds.delta); } } } return ch; }
/** * Returns the case canonical version of the given code-unit. ECMAScript 5 * explicitly says that code-units are to be treated as their code-point * equivalent, even surrogates. */ public static char caseCanonicalize(char ch) { if (ch < 0x80) { // Normal case. return ('A' <= ch && ch <= 'Z') ? (char) (ch | 32) : ch; } // Non-ASCII case. if (CASE_SENSITIVE.contains(ch)) { for (DeltaSet ds : CANON_DELTA_SETS) { if (ds.codeUnits.contains(ch)) { return (char) (ch - ds.delta); } } } return ch; }
@Override public boolean isCaseSensitive() { for (int i = 0, n = text.length(); i < n; ++i) { if (CaseCanonicalize.CASE_SENSITIVE.contains(text.charAt(i))) { return true; } } return false; }
@Override public boolean isCaseSensitive() { for (int i = 0, n = text.length(); i < n; ++i) { if (CaseCanonicalize.CASE_SENSITIVE.contains(text.charAt(i))) { return true; } } return false; }
char ch = ((Text) charAlternative).text.charAt(0); members[memberIdx++] = ch; if (IE_SPEC_ERRORS.contains(ch)) { ieExplicits = ieExplicits.union(CharRanges.inclusive(ch, ch));
char ch = ((Text) charAlternative).text.charAt(0); members[memberIdx++] = ch; if (IE_SPEC_ERRORS.contains(ch)) { ieExplicits = ieExplicits.union(CharRanges.inclusive(ch, ch));