mirror of
https://github.com/leethomason/tinyxml2.git
synced 2026-07-31 07:53:02 +04:00
Clarify IsNameStartChar() - resolve issue 250
This commit is contained in:
+8
-3
@@ -552,9 +552,14 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static bool IsNameStartChar( unsigned char ch ) {
|
inline static bool IsNameStartChar( unsigned char ch ) {
|
||||||
return ( ( ch < 128 ) ? isalpha( ch ) : 1 )
|
if ( ch >= 128 ) {
|
||||||
|| ch == ':'
|
// This is a heuristic guess in attempt to not implement Unicode-aware isalpha()
|
||||||
|| ch == '_';
|
return true;
|
||||||
|
}
|
||||||
|
if ( isalpha( ch ) ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return ch == ':' || ch == '_';
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static bool IsNameChar( unsigned char ch ) {
|
inline static bool IsNameChar( unsigned char ch ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user