diff options
Diffstat (limited to 'include/str.h')
-rw-r--r-- | include/str.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/str.h b/include/str.h index f4054a1..b208515 100644 --- a/include/str.h +++ b/include/str.h @@ -19,6 +19,9 @@ typedef array(char) str; #define S(X) ((str) { len(X)-1, X }) #define NILS ((str) { 0, NULL }) +typedef struct { size_t cap; str buf; } strbuf; +#define NILSBUF ((strbuf) { 0, NILS }) + // compares two strings by length and ASCII values. return value: // < 0 if s1 < s2 // = 0 if s1 = s2 |