From e57595741285eebf1aac2f2ceac19cae5d949612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 14 Sep 2015 21:14:53 +0200 Subject: buffer: add buffer_put0 to store a NUL terminated string --- buffer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'buffer.h') diff --git a/buffer.h b/buffer.h index 23a92ba..088248b 100644 --- a/buffer.h +++ b/buffer.h @@ -21,6 +21,8 @@ bool buffer_grow(Buffer*, size_t size); void buffer_truncate(Buffer*); /* replace buffer content with given data, growing the buffer if needed */ bool buffer_put(Buffer*, const void *data, size_t len); +/* same but with NUL-terminated data */ +bool buffer_put0(Buffer*, const char *data); /* append futher content to the end of the buffer data */ bool buffer_append(Buffer*, const void *data, size_t len); /* append NUl-terminated data */ -- cgit v1.2.3