MCPcopy Create free account
hub / github.com/BaseXdb/basex / isNCStartChar

Method isNCStartChar

basex-core/src/main/java/org/basex/util/XMLToken.java:143–152  ·  view source on GitHub ↗

Checks if the specified character is a name start character, as required e.g. by QName and NCName. @param cp codepoint of the character @return result of check

(final int cp)

Source from the content-addressed store, hash-verified

141 * @return result of check
142 */
143 public static boolean isNCStartChar(final int cp) {
144 return cp < 0x80 ?
145 cp >= 'A' && cp <= 'Z' || cp >= 'a' && cp <= 'z' || cp == '_' :
146 cp < 0x300 ? cp >= 0xC0 && cp != 0xD7 && cp != 0xF7 :
147 cp >= 0x370 && cp <= 0x37D || cp >= 0x37F && cp <= 0x1FFF ||
148 cp >= 0x200C && cp <= 0x200D || cp >= 0x2070 && cp <= 0x218F ||
149 cp >= 0x2C00 && cp <= 0x2EFF || cp >= 0x3001 && cp <= 0xD7FF ||
150 cp >= 0xF900 && cp <= 0xFDCF || cp >= 0xFDF0 && cp <= 0xFFFD ||
151 cp >= 0x10000 && cp <= 0xEFFFF;
152 }
153
154 /**
155 * Checks if the specified character is an XML letter.

Callers 11

numericLiteralMethod · 0.95
dirElementMethod · 0.95
qNameMethod · 0.95
ncNameMethod · 0.95
wsConsumeWsMethod · 0.95
getColorMethod · 0.95
isNCCharMethod · 0.95
isStartCharMethod · 0.95
ncNameMethod · 0.95
encodeMethod · 0.95
decodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected