diff options
author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-06-19 21:11:50 +0200 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-06-19 21:11:50 +0200 |
commit | dfe8ddb9ff8b3f90036a0e47220b6c180cc95ea7 (patch) | |
tree | 7b8ca0aa82b923d384f234b7d3364d1f752692c0 /include | |
parent | 47984162974a8f7d9903d352567005ac569c5a87 (diff) |
str.c: fix str_cmp and add str_eq
Signed-off-by: Lizzy Fleckenstein <lizzy@vlhl.dev>
Diffstat (limited to 'include')
-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 277a6f3..5b3e04c 100644 --- a/include/str.h +++ b/include/str.h @@ -20,6 +20,9 @@ typedef array(char) str; typedef arraybuf(char) strbuf; #define NILSBUF ((strbuf) { 0, 0, NULL }) +// return if two strings are equal +bool str_eq(str s1, str s2); + // compares two strings by length and ASCII values. return value: // < 0 if s1 < s2 // = 0 if s1 = s2 |