* xmlStrcat: * @cur: the original xmlChar * array * @add: the xmlChar * array added * * a strcat for array of xmlChar's. Since they are supposed to be * encoded in UTF-8 or an encoding with 8bit based chars, we assume * a termination mark of '0'. * * Returns a new xmlChar * containing the concatenated string. The original * @cur is reallocated and should not be freed. */
| 529 | * @cur is reallocated and should not be freed. |
| 530 | */ |
| 531 | xmlChar * |
| 532 | xmlStrcat(xmlChar *cur, const xmlChar *add) { |
| 533 | const xmlChar *p = add; |
| 534 | |
| 535 | if (add == NULL) return(cur); |
| 536 | if (cur == NULL) |
| 537 | return(xmlStrdup(add)); |
| 538 | |
| 539 | while (*p != 0) p++; /* non input consuming */ |
| 540 | return(xmlStrncat(cur, add, p - add)); |
| 541 | } |
| 542 | |
| 543 | /** |
| 544 | * xmlStrPrintf: |
no test coverage detected