本文整理汇总了Java中sun.text.Normalizer.getCombiningClass方法的典型用法代码示例。如果您正苦于以下问题:Java Normalizer.getCombiningClass方法的具体用法?Java Normalizer.getCombiningClass怎么用?Java Normalizer.getCombiningClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.text.Normalizer
的用法示例。
在下文中一共展示了Normalizer.getCombiningClass方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isAfterI
import sun.text.Normalizer; //导入方法依赖的package包/类
/**
* Implements the "After_I" condition
*
* Specification: The last preceding base character was an uppercase I,
* and there is no intervening combining character class 230 (ABOVE).
*
* Regular Expression:
* Before C: [I]([{cc!=230}&{cc!=0}])*
*/
private static boolean isAfterI(String src, int index) {
int ch;
int cc;
// Look for the last preceding base character
for (int i = index; i > 0; i -= Character.charCount(ch)) {
ch = src.codePointBefore(i);
if (ch == 'I') {
return true;
} else {
cc = Normalizer.getCombiningClass(ch);
if ((cc == 0) || (cc == COMBINING_CLASS_ABOVE)) {
return false;
}
}
}
return false;
}
示例2: isAfterSoftDotted
import sun.text.Normalizer; //导入方法依赖的package包/类
/**
* Implements the "After_Soft_Dotted" condition
*
* Specification: The last preceding character with combining class
* of zero before C was Soft_Dotted, and there is no intervening
* combining character class 230 (ABOVE).
*
* Regular Expression:
* Before C: [{Soft_Dotted==true}]([{cc!=230}&{cc!=0}])*
*/
private static boolean isAfterSoftDotted(String src, int index) {
int ch;
int cc;
// Look for the last preceding character
for (int i = index; i > 0; i -= Character.charCount(ch)) {
ch = src.codePointBefore(i);
if (isSoftDotted(ch)) {
return true;
} else {
cc = Normalizer.getCombiningClass(ch);
if ((cc == 0) || (cc == COMBINING_CLASS_ABOVE)) {
return false;
}
}
}
return false;
}
示例3: isMoreAbove
import sun.text.Normalizer; //导入方法依赖的package包/类
/**
* Implements the "More_Above" condition
*
* Specification: C is followed by one or more characters of combining
* class 230 (ABOVE) in the combining character sequence.
*
* Regular Expression:
* After C: [{cc!=0}]*[{cc==230}]
*/
private static boolean isMoreAbove(String src, int index) {
int ch;
int cc;
int len = src.length();
// Look for a following ABOVE combining class character
for (int i = index + Character.charCount(src.codePointAt(index));
i < len; i += Character.charCount(ch)) {
ch = src.codePointAt(i);
cc = Normalizer.getCombiningClass(ch);
if (cc == COMBINING_CLASS_ABOVE) {
return true;
} else if (cc == 0) {
return false;
}
}
return false;
}
示例4: isBeforeDot
import sun.text.Normalizer; //导入方法依赖的package包/类
/**
* Implements the "Before_Dot" condition
*
* Specification: C is followed by <code>U+0307 COMBINING DOT ABOVE</code>.
* Any sequence of characters with a combining class that is
* neither 0 nor 230 may intervene between the current character
* and the combining dot above.
*
* Regular Expression:
* After C: ([{cc!=230}&{cc!=0}])*[\u0307]
*/
private static boolean isBeforeDot(String src, int index) {
int ch;
int cc;
int len = src.length();
// Look for a following COMBINING DOT ABOVE
for (int i = index + Character.charCount(src.codePointAt(index));
i < len; i += Character.charCount(ch)) {
ch = src.codePointAt(i);
if (ch == '\u0307') {
return true;
} else {
cc = Normalizer.getCombiningClass(ch);
if ((cc == 0) || (cc == COMBINING_CLASS_ABOVE)) {
return false;
}
}
}
return false;
}
示例5: isAfterI
import sun.text.Normalizer; //导入方法依赖的package包/类
/**
* Implements the "After_I" condition
*
* Specification: The last preceding base character was an uppercase I,
* and there is no intervening combining character class 230 (ABOVE).
*
* Regular Expression:
* Before C: [I]([{cc!=230}&{cc!=0}])*
*/
private static boolean isAfterI(String src, int index) {
int ch;
int cc;
// Look for the last preceding base character
for (int i = index; i > 0; i -= Character.charCount(ch)) {
ch = src.codePointBefore(i);
if (ch == 'I') {
return true;
} else {
cc = Normalizer.getCombiningClass(ch);
if ((cc == 0) || (cc == COMBINING_CLASS_ABOVE)) {
return false;
}
}
}
return false;
}
示例6: isAfterSoftDotted
import sun.text.Normalizer; //导入方法依赖的package包/类
/**
* Implements the "After_Soft_Dotted" condition
*
* Specification: The last preceding character with combining class
* of zero before C was Soft_Dotted, and there is no intervening
* combining character class 230 (ABOVE).
*
* Regular Expression:
* Before C: [{Soft_Dotted==true}]([{cc!=230}&{cc!=0}])*
*/
private static boolean isAfterSoftDotted(String src, int index) {
int ch;
int cc;
// Look for the last preceding character
for (int i = index; i > 0; i -= Character.charCount(ch)) {
ch = src.codePointBefore(i);
if (isSoftDotted(ch)) {
return true;
} else {
cc = Normalizer.getCombiningClass(ch);
if ((cc == 0) || (cc == COMBINING_CLASS_ABOVE)) {
return false;
}
}
}
return false;
}
示例7: isMoreAbove
import sun.text.Normalizer; //导入方法依赖的package包/类
/**
* Implements the "More_Above" condition
*
* Specification: C is followed by one or more characters of combining
* class 230 (ABOVE) in the combining character sequence.
*
* Regular Expression:
* After C: [{cc!=0}]*[{cc==230}]
*/
private static boolean isMoreAbove(String src, int index) {
int ch;
int cc;
int len = src.length();
// Look for a following ABOVE combining class character
for (int i = index + Character.charCount(src.codePointAt(index));
i < len; i += Character.charCount(ch)) {
ch = src.codePointAt(i);
cc = Normalizer.getCombiningClass(ch);
if (cc == COMBINING_CLASS_ABOVE) {
return true;
} else if (cc == 0) {
return false;
}
}
return false;
}
示例8: isBeforeDot
import sun.text.Normalizer; //导入方法依赖的package包/类
/**
* Implements the "Before_Dot" condition
*
* Specification: C is followed by <code>U+0307 COMBINING DOT ABOVE</code>.
* Any sequence of characters with a combining class that is
* neither 0 nor 230 may intervene between the current character
* and the combining dot above.
*
* Regular Expression:
* After C: ([{cc!=230}&{cc!=0}])*[\u0307]
*/
private static boolean isBeforeDot(String src, int index) {
int ch;
int cc;
int len = src.length();
// Look for a following COMBINING DOT ABOVE
for (int i = index + Character.charCount(src.codePointAt(index));
i < len; i += Character.charCount(ch)) {
ch = src.codePointAt(i);
if (ch == '\u0307') {
return true;
} else {
cc = Normalizer.getCombiningClass(ch);
if ((cc == 0) || (cc == COMBINING_CLASS_ABOVE)) {
return false;
}
}
}
return false;
}