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)
| 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. |
no outgoing calls
no test coverage detected