* xmlOutputBufferWriteString: * @out: a buffered parser output * @str: a zero terminated C string * * Write the content of the string in the output I/O buffer * This routine handle the I18N transcoding from internal UTF-8 * The buffer is lossless, i.e. will store in case of partial * or delayed writes. * * Returns the number of chars immediately written, or -1 * in case of erro
| 3420 | * in case of error. |
| 3421 | */ |
| 3422 | int |
| 3423 | xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) { |
| 3424 | int len; |
| 3425 | |
| 3426 | if ((out == NULL) || (out->error)) return(-1); |
| 3427 | if (str == NULL) |
| 3428 | return(-1); |
| 3429 | len = strlen(str); |
| 3430 | |
| 3431 | if (len > 0) |
| 3432 | return(xmlOutputBufferWrite(out, len, str)); |
| 3433 | return(len); |
| 3434 | } |
| 3435 | |
| 3436 | /** |
| 3437 | * xmlOutputBufferFlush: |