diff options
Diffstat (limited to 'buf.h')
-rw-r--r-- | buf.h | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -6,16 +6,14 @@ typedef struct buf buf; buf* newbuf(size_t cap); -void addchrbuf(buf* buffer, char chr); // front -void addstrbuf(buf* buffer, char* str); -char remchrbuf(buf* buffer); -char* remstrbuf(buf* buffer, int ct); +size_t buflen(buf* buffer); -void prechrbuf(buf* buffer, char chr); // back -void prestrbuf(buf* buffer, char* str); -char shfchrbuf(buf* buffer); -char* shfstrbuf(buf* buffer, int ct); +char popchrbuf(buf* buffer); +char* popstrbuf(buf* buffer, size_t ct); -char* strpeekbuf(buf* buffer, int loc); +void inschrbuf(buf* buffer, char chr); +void insstrbuf(buf* buffer, char* str); + +char* strpeekbuf(buf* buffer, size_t loc, size_t len); #endif |