本文整理了Java中java.lang.Character.isIdeographic()
方法的一些代码示例,展示了Character.isIdeographic()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Character.isIdeographic()
方法的具体详情如下:
包路径:java.lang.Character
类名称:Character
方法名:isIdeographic
[英]Returns true if the given code point is a CJKV ideographic character.
[中]如果给定的代码点是CJKV表意字符,则返回true。
代码示例来源:origin: apache/tika
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;
}
代码示例来源:origin: org.apidesign.bck2brwsr/emul
public boolean is(int ch) {
return Character.isIdeographic(ch);
}
},
代码示例来源:origin: jtulach/bck2brwsr
public boolean is(int ch) {
return Character.isIdeographic(ch);
}
},
代码示例来源:origin: org.apidesign.bck2brwsr/emul
boolean isSatisfiedBy(int ch) {
return Character.isIdeographic(ch);}});
defClone("javaTitleCase", new CloneableProperty() {
代码示例来源:origin: bluestreak01/questdb
public boolean is(int ch) {
return Character.isIdeographic(ch);
}
},
代码示例来源:origin: bluestreak01/questdb
boolean isSatisfiedBy(int ch) {
return Character.isIdeographic(ch);
}
});
代码示例来源:origin: stackoverflow.com
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)
代码示例来源:origin: jtulach/bck2brwsr
boolean isSatisfiedBy(int ch) {
return Character.isIdeographic(ch);}});
defClone("javaTitleCase", new CloneableProperty() {
代码示例来源:origin: zgqq/mah
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;
}
代码示例来源:origin: zgqq/mah
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;
}
}
代码示例来源:origin: zgqq/mah
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();
}
代码示例来源:origin: ModernMT/MMT
type = WHITESPACE;
} else {
boolean isCJKV = splitCJKV && (Character.isSurrogate(c) || Character.isIdeographic(c));
boolean isNonBreakableChar = (c == '-') || Character.isLetterOrDigit(c);
代码示例来源:origin: bluestreak01/questdb
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() ||
内容来源于网络,如有侵权,请联系作者删除!