public static boolean isAlphabetic(char[] token, int length) { for (int i = 0; i < length; i++) { int cp = token[i]; if (Character.isHighSurrogate(token[i])) { if (i < length-1) { cp = Character.toCodePoint(token[i], token[i + 1]); i++; } } if (Character.isDigit(cp)) { return false; } if (! Character.isAlphabetic(cp) && ! Character.isIdeographic(cp) && cp != UNDERSCORE) { return false; } } return true; }
public boolean is(int ch) { return Character.isIdeographic(ch); } },
public boolean is(int ch) { return Character.isIdeographic(ch); } },
boolean isSatisfiedBy(int ch) { return Character.isIdeographic(ch);}}); defClone("javaTitleCase", new CloneableProperty() {
public boolean is(int ch) { return Character.isIdeographic(ch); } },
boolean isSatisfiedBy(int ch) { return Character.isIdeographic(ch); } });
scala> (0 until x.codePointCount(0, x.length)).map(c => x.offsetByCodePoints(0, c)).map(i => Character.isIdeographic(x.codePointAt(i))).toList res2: List[Boolean] = List(true, true, false, false, false)
boolean isSatisfiedBy(int ch) { return Character.isIdeographic(ch);}}); defClone("javaTitleCase", new CloneableProperty() {
public static int getLength(String text) { int length = 0; for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (Character.isIdeographic(c)) { length += IDO_LEN; } else { length += 1; } } return length; }
public static int getIndexBySpecificLength(String text, int len) { if (text == null) { return -1; } int length = 0; for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (Character.isIdeographic(c)) { length += IDO_LEN; } else { length += 1; } if (length >= len) { return i - 1; } } return text.length() - 1; } }
public static int getLen(String origin, String text, int maxLen) { int length; if ((length = getLength(origin)) > maxLen) { return 0; } for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (Character.isIdeographic(c)) { length += IDO_LEN; } else { length += 1; } if (length > maxLen) { return i; } } return text.length(); }
type = WHITESPACE; } else { boolean isCJKV = splitCJKV && (Character.isSurrogate(c) || Character.isIdeographic(c)); boolean isNonBreakableChar = (c == '-') || Character.isLetterOrDigit(c);
Character.isIdeographic(cp) != ideogP.reset(str).matches() || Character.isIdeographic(cp) != ideogJ.reset(str).matches() || (Character.UNASSIGNED == type) == definedP.reset(str).matches() || POSIX_Unicode.isNoncharacterCodePoint(cp) != nonCCPP.reset(str).matches() ||