本文整理汇总了Java中com.ibm.icu.lang.UScript.CODE_LIMIT属性的典型用法代码示例。如果您正苦于以下问题:Java UScript.CODE_LIMIT属性的具体用法?Java UScript.CODE_LIMIT怎么用?Java UScript.CODE_LIMIT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.ibm.icu.lang.UScript
的用法示例。
在下文中一共展示了UScript.CODE_LIMIT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getResolvedScriptSetWithout
/**
* Computes the resolved script set for a string, omitting characters having the specified script. If
* UScript.CODE_LIMIT is passed as the second argument, all characters are included.
*/
private void getResolvedScriptSetWithout(CharSequence input, int script, ScriptSet result) {
result.setAll();
ScriptSet temp = new ScriptSet();
for (int utf16Offset = 0; utf16Offset < input.length();) {
int codePoint = Character.codePointAt(input, utf16Offset);
utf16Offset += Character.charCount(codePoint);
// Compute the augmented script set for the character
getAugmentedScriptSet(codePoint, temp);
// Intersect the augmented script set with the resolved script set, but only if the character doesn't
// have the script specified in the function call
if (script == UScript.CODE_LIMIT || !temp.get(script)) {
result.and(temp);
}
}
}
示例2: appendStringTo
public void appendStringTo(StringBuilder sb) {
sb.append("{ ");
if (isEmpty()) {
sb.append("- ");
} else if (isFull()) {
sb.append("* ");
} else {
for (int script = 0; script < UScript.CODE_LIMIT; script++) {
if (get(script)) {
sb.append(UScript.getShortName(script));
sb.append(" ");
}
}
}
sb.append("}");
}
示例3: isFull
public boolean isFull() {
return cardinality() == UScript.CODE_LIMIT;
}