docs/Writerside/topics/buffer.h.md

changeset 1576
7e19168d49d1
parent 1575
dde0c67a449b
--- a/docs/Writerside/topics/buffer.h.md	Thu Dec 11 23:47:46 2025 +0100
+++ b/docs/Writerside/topics/buffer.h.md	Fri Dec 12 15:07:38 2025 +0100
@@ -165,12 +165,14 @@
 
 int cxBufferPut(CxBuffer *buffer, int c);
 
-size_t cxBufferPutString(CxBuffer *buffer, const char *str);
+size_t cxBufferPutString(CxBuffer *buffer, AnyStr str);
 
 int cxBufferTerminate(CxBuffer *buffer);
 
 size_t cxBufferAppend(const void *ptr, size_t size, size_t nitems,
         CxBuffer *buffer);
+
+size_t cxBufferAppendString(CxBuffer *buffer, AnyStr str);
 ```
 
 The primary function for writing to a buffer is `cxBufferWrite()`
@@ -189,8 +191,8 @@
 Just like `putc()` this function returns the written character on success, and `EOF` on failure,
 but it does _not_ set `errno` on failure.
 
-The function `cxBufferPutString()` is a convenience function,
-that uses stdlib `strlen()` to compute the length of `str` and then invokes `cxBufferWrite()`.
+The function `cxBufferPutString()` is a convenience function that uses `cx_strcast()` to convert any supported string type to a `cxstring` and then invokes `cxBufferWrite()`.
+Similarly, `cxBufferAppendString()` performs the same operation with `cxBufferAppend()`.
 
 All the above functions advance the buffer position by the number of bytes written 
 and cause the _size_ of the buffer to grow, if necessary, to contain all written bytes.

mercurial