aboutsummaryrefslogtreecommitdiff
path: root/buf.h
blob: 808cd3f0d682d8e8f95d805f8e4e914743fd0e74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef _BUF_INCLUDE
#define _BUF_INCLUDE

typedef struct buf_node buf_node;
typedef struct buf buf;

buf* newbuf(size_t cap);

size_t buflen(buf* buffer);

char popchrbuf(buf* buffer);
char* popstrbuf(buf* buffer, size_t ct);

void inschrbuf(buf* buffer, char chr);
void insstrbuf(buf* buffer, char* str);

char* strpeekbuf(buf* buffer, size_t loc, size_t len);

#endif