From 521d01e8ad87e931af3e9a763cc84a6cf7fe5ee3 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 5 Dec 2021 09:47:21 -0800 Subject: Feat: basic string and memory functions Continue filling out the basic standard lib functions. Included prototypes of the str* and mem* families. Plan to add e(str|mem) and n(str|mem) variants as well. --- src/base/string/equals.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/base/string/equals.c') diff --git a/src/base/string/equals.c b/src/base/string/equals.c index a975cf5..3637d67 100644 --- a/src/base/string/equals.c +++ b/src/base/string/equals.c @@ -2,11 +2,13 @@ // Equals returns true if string s and t are equivalent. bool -str·equals(const string s, const string t) +string·equals(string s, string t) { - vlong sL = str·len(s); - vlong tL = str·len(t); - if (sL != tL) return false; + vlong sL = string·len(s); + vlong tL = string·len(t); + + if(sL != tL) + return false; return memcmp(s, t, sL) == 0; } -- cgit v1.2.1