From dfe8ddb9ff8b3f90036a0e47220b6c180cc95ea7 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Wed, 19 Jun 2024 21:11:50 +0200 Subject: str.c: fix str_cmp and add str_eq Signed-off-by: Lizzy Fleckenstein --- include/str.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') 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 -- cgit v1.2.3