diff options
author | Test_User <hax@andrewyu.org> | 2023-08-09 23:40:58 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2023-08-09 23:40:58 -0400 |
commit | ffc06e4614772a681114d4059a072f599ee378f8 (patch) | |
tree | b19699cf499e66c056104e7192fe00f01d583931 /types.h | |
parent | be4a88382717cb297d7aefadedb32d5f9c41ffb1 (diff) | |
download | c_coupserv-ffc06e4614772a681114d4059a072f599ee378f8.tar.gz c_coupserv-ffc06e4614772a681114d4059a072f599ee378f8.zip |
STRING_EQ
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -38,4 +38,7 @@ struct string { #define STRING(x) (struct string){x, sizeof(x)-1} #define NULSTR(x) (struct string){x, strlen(x)} + +#define STRING_EQ(x, y) (x.len == y.len && memcmp(x.data, y.data, x.len) == 0) + #define WRITES(x, y) write(x, y.data, y.len) |