* 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
| 2758 | * in case of error. |
| 2759 | */ |
| 2760 | int |
| 2761 | xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) { |
| 2762 | int len; |
| 2763 | |
| 2764 | if ((out == NULL) || (out->error)) return(-1); |
| 2765 | if (str == NULL) |
| 2766 | return(-1); |
| 2767 | len = strlen(str); |
| 2768 | |
| 2769 | if (len > 0) |
| 2770 | return(xmlOutputBufferWrite(out, len, str)); |
| 2771 | return(len); |
| 2772 | } |
| 2773 | |
| 2774 | /** |
| 2775 | * xmlOutputBufferWriteQuotedString: |
no test coverage detected