MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlSplitQName3

Function xmlSplitQName3

ThirdParty/libxml2/vtklibxml2/tree.c:268–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266 */
267
268const xmlChar *
269xmlSplitQName3(const xmlChar *name, int *len) {
270 int l = 0;
271
272 if (name == NULL) return(NULL);
273 if (len == NULL) return(NULL);
274
275 /* nasty but valid */
276 if (name[0] == ':')
277 return(NULL);
278
279 /*
280 * we are not trying to validate but just to cut, and yes it will
281 * work even if this is as set of UTF-8 encoded chars
282 */
283 while ((name[l] != 0) && (name[l] != ':'))
284 l++;
285
286 if ((name[l] == 0) || (name[l+1] == 0))
287 return(NULL);
288
289 *len = l;
290
291 return(&name[l+1]);
292}
293
294/**
295 * xmlSplitQName4:

Callers 4

xmlNewDocElementContentFunction · 0.85
xmlValidateCheckMixedFunction · 0.85
xmlAddDefAttrsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected