* Probably simpler than a stateless function that has to figure out complex context-before
* for each character.
* TODO: Try to re-consolidate one way or another with the non-Greek function.
+ *
+ * <p>Keep this consistent with the C++ versions in ustrcase.cpp (UTF-16) and ucasemap.cpp (UTF-8).
*/
private static String toUpper(CharSequence s, int[] locCache) {
StringBuilder result = new StringBuilder(s.length());
return getTypeFromProps(trie.get(c));
}
- /** @return same as ucase_getType() and set bit 2 if c is case-ignorable */
+ /** @return like getType() but also sets IGNORABLE if c is case-ignorable */
public final int getTypeOrIgnorable(int c) {
return getTypeAndIgnorableFromProps(trie.get(c));
}
public static final int UPPER=2;
public static final int TITLE=3;
+ /** @return NONE, LOWER, UPPER, TITLE */
private static final int getTypeFromProps(int props) {
return props&TYPE_MASK;
}
+ /** @return like getTypeFromProps() but also sets IGNORABLE if props indicate case-ignorable */
private static final int getTypeAndIgnorableFromProps(int props) {
return props&7;
}
- public static final int IGNORABLE= 4;
+ static final int IGNORABLE=4;
private static final int SENSITIVE= 8;
private static final int EXCEPTION= 0x10;