summaryrefslogtreecommitdiffstats
path: root/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.h')
-rw-r--r--buffer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/buffer.h b/buffer.h
index 8d04103..eb37794 100644
--- a/buffer.h
+++ b/buffer.h
@@ -137,6 +137,13 @@ buf_reset (struct buffer *buf)
buf->data = NULL;
}
+static inline void
+buf_reset_len (struct buffer *buf)
+{
+ buf->len = 0;
+ buf->offset = 0;
+}
+
static inline bool
buf_init_dowork (struct buffer *buf, int offset)
{
@@ -224,6 +231,7 @@ void buf_rmtail (struct buffer *buf, uint8_t remove);
* non-buffer string functions
*/
void chomp (char *str);
+void rm_trailing_chars (char *str, const char *what_to_delete);
const char *skip_leading_whitespace (const char *str);
void string_null_terminate (char *str, int len, int capacity);