本文整理了Java中java.lang.Character.isUnicodeIdentifierStart()
方法的一些代码示例,展示了Character.isUnicodeIdentifierStart()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Character.isUnicodeIdentifierStart()
方法的具体详情如下:
包路径:java.lang.Character
类名称:Character
方法名:isUnicodeIdentifierStart
[英]Indicates whether the specified character is a valid initial character for a Unicode identifier.
[中]指示指定的字符是否为Unicode标识符的有效初始字符。
代码示例来源:origin: konsoletyper/teavm
@Override
public boolean contains(int ch) {
return Character.isUnicodeIdentifierStart(ch);
}
};
代码示例来源:origin: log4j/log4j
if (!Character.isUnicodeIdentifierStart(lastChar)) {
return i;
代码示例来源:origin: twosigma/beakerx
private AutocompleteResult autocomplete(String code, int caretPosition, Var clojureLoadString, String shellId) {
int i = caretPosition;
while (i > 0) {
char c = code.charAt(i - 1);
if (!Character.isUnicodeIdentifierStart(c) || "[]{}()/\\".indexOf(c) >= 0) {
break;
} else {
i--;
}
}
String _code = code.substring(i, caretPosition);
String apropos = "(repl_%1$s/apropos \"%2$s\")";
Object o = clojureLoadString.invoke(String.format(apropos, shellId, _code));
List<String> result = new ArrayList<String>();
for (Object s : ((Collection) o)) {
String whole = s.toString();
int d = whole.indexOf('/');
if (d > 0) {
String woNS = whole.substring(d + 1);
String ns = whole.substring(0, d);
result.add(woNS);
String currenClojureNS = String.format("%1$s_%2$s", beaker_clojure_ns, shellId);
if (!currenClojureNS.equals(ns) && !"clojure.core".equals(ns)) result.add(whole);
} else {
result.add(whole);
}
}
return new AutocompleteResult(result, i);
}
代码示例来源:origin: org.antlr/antlr4-runtime
public boolean isNameStartChar(int c) { return Character.isUnicodeIdentifierStart(c); }
}
代码示例来源:origin: apache/log4j
if (!Character.isUnicodeIdentifierStart(lastChar)) {
return i;
代码示例来源:origin: geotools/geotools
if (!Character.isUnicodeIdentifierStart(text.charAt(lower))) {
final Number number = parser.parseNumber(text, position);
if (number == null) {
代码示例来源:origin: xpp3/xpp3_xpath
boolean isIdentifierStartChar(char c)
{
return c == '_' || Character.isUnicodeIdentifierStart( c );
}
}
代码示例来源:origin: vojtechhabarta/typescript-generator
private static boolean isValidIdentifierStart(char start) {
return Character.isUnicodeIdentifierStart(start) || start == '$' || start == '_';
}
代码示例来源:origin: saxpath/saxpath
boolean isIdentifierStartChar(char c)
{
return c == '_' || Character.isUnicodeIdentifierStart( c );
}
}
代码示例来源:origin: org.ogce/xpp3
boolean isIdentifierStartChar(char c)
{
return c == '_' || Character.isUnicodeIdentifierStart( c );
}
}
代码示例来源:origin: amplafi/htmlcleaner
/**
* Checks if character at specified position can be identifier start.
* @param position
* @return true is may be identifier start, false otherwise.
*/
private boolean isIdentifierStartChar(int position) {
if (_len >= 0 && position >= _len) {
return false;
}
char ch = _working[position];
return Character.isUnicodeIdentifierStart(ch);
}
代码示例来源:origin: org.dspace.dependencies.solr/dspace-solr-core
private boolean isFirstIdChar(int ch) {
return Character.isUnicodeIdentifierStart(ch);
// return isAlpha(ch) || ch=='_' || Character.isLetter(ch);
}
代码示例来源:origin: bluestreak01/questdb
boolean isSatisfiedBy(int ch) {
return Character.isUnicodeIdentifierStart(ch);
}
});
代码示例来源:origin: apache/olingo-odata4
static boolean isAllowedWord(final char character) {
return Character.isUnicodeIdentifierStart(character);
}
代码示例来源:origin: info.bliki.wiki/bliki-core
/**
* Checks if character at specified position can be identifier start.
*
* @param position
* @return true is may be identifier start, false otherwise.
*/
private boolean isIdentifierStartChar(int position) {
if (_len >= 0 && position >= _len) {
return false;
}
char ch = _working[position];
return Character.isUnicodeIdentifierStart(ch) || (':' == ch);
}
代码示例来源:origin: info.bliki.wiki/bliki-core
/**
* Checks if character at current runtime position can be identifier part.
*
* @return true is may be identifier part, false otherwise.
*/
private boolean isIdentifierChar() {
if (_len >= 0 && _pos >= _len) {
return false;
}
char ch = _working[_pos];
return Character.isUnicodeIdentifierStart(ch) || Character.isDigit(ch) || (':' == ch) || ('.' == ch) || ('-' == ch);
}
代码示例来源:origin: fivesmallq/web-data-extractor
/**
* Checks if character at current runtime position can be identifier part.
*
* @return true is may be identifier part, false otherwise.
*/
private boolean isIdentifierChar() {
if (_len >= 0 && _pos >= _len) {
return false;
}
char ch = _working[_pos];
return Character.isUnicodeIdentifierStart(ch) || Character.isDigit(ch) || Utils.isIdentifierHelperChar(ch);
}
代码示例来源:origin: amplafi/htmlcleaner
/**
* Checks if character at current runtime position can be identifier part.
* @return true is may be identifier part, false otherwise.
*/
private boolean isIdentifierChar() {
if (_len >= 0 && _pos >= _len) {
return false;
}
char ch = _working[_pos];
return Character.isUnicodeIdentifierStart(ch) || Character.isDigit(ch) || Utils.isIdentifierHelperChar(ch);
}
代码示例来源:origin: com.tunnelvisionlabs/antlr4-runtime
private boolean NameStartChar_sempred(RuleContext _localctx, int predIndex) {
switch (predIndex) {
case 1:
return Character.isUnicodeIdentifierStart(_input.LA(-1));
}
return true;
}
代码示例来源:origin: opengeospatial/geoapi
/**
* Returns {@code true} if the given codepoint is an unicode identifier start or part.
*/
private static boolean isUnicodeIdentifier(final int codepoint, final boolean part) {
return part ? Character.isUnicodeIdentifierPart (codepoint)
: Character.isUnicodeIdentifierStart(codepoint);
}
内容来源于网络,如有侵权,请联系作者删除!