MCPcopy Create free account
hub / github.com/9miao/CrossApp / ParseName

Method ParseName

CrossApp/support/tinyxml2/tinyxml2.cpp:131–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129
130
131char* StrPair::ParseName( char* p )
132{
133 char* start = p;
134
135 if ( !start || !(*start) ) {
136 return 0;
137 }
138
139 while( *p && (
140 XMLUtil::IsAlphaNum( (unsigned char) *p )
141 || *p == '_'
142 || *p == ':'
143 || (*p == '-' && p>start ) // can be in a name, but not lead it.
144 || (*p == '.' && p>start ) )) { // can be in a name, but not lead it.
145 ++p;
146 }
147
148 if ( p > start ) {
149 Set( start, p, 0 );
150 return p;
151 }
152 return 0;
153}
154
155
156void StrPair::CollapseWhitespace()

Callers 1

ParseDeepMethod · 0.80

Calls 2

IsAlphaNumFunction · 0.85
SetFunction · 0.70

Tested by

no test coverage detected