* xmlValidNormalizeString: * @str: a string * * Normalize a string in-place. */
| 3233 | * Normalize a string in-place. |
| 3234 | */ |
| 3235 | static void |
| 3236 | xmlValidNormalizeString(xmlChar *str) { |
| 3237 | xmlChar *dst; |
| 3238 | const xmlChar *src; |
| 3239 | |
| 3240 | if (str == NULL) |
| 3241 | return; |
| 3242 | src = str; |
| 3243 | dst = str; |
| 3244 | |
| 3245 | while (*src == 0x20) src++; |
| 3246 | while (*src != 0) { |
| 3247 | if (*src == 0x20) { |
| 3248 | while (*src == 0x20) src++; |
| 3249 | if (*src != 0) |
| 3250 | *dst++ = 0x20; |
| 3251 | } else { |
| 3252 | *dst++ = *src++; |
| 3253 | } |
| 3254 | } |
| 3255 | *dst = 0; |
| 3256 | } |
| 3257 | |
| 3258 | static int |
| 3259 | xmlIsDocNameStartChar(xmlDocPtr doc, int c) { |
no outgoing calls
no test coverage detected