commit 59e64403e8186d3e1c6946eeaea896999455beff
parent c4279a78c44b59230a6f612996e56f3c7d41282b
Author: Sebastian <sebastian@sebsite.pw>
Date: Sat, 20 Apr 2024 19:36:19 -0400
strings: mention == in strings::compare docs
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/strings/compare.ha b/strings/compare.ha
@@ -6,6 +6,9 @@ use sort::cmp;
// Compares two strings by their Unicode codepoint sort order. Zero is returned
// if the strings are equal, a negative value if a is less than b, or a positive
// value if a is greater than b.
+//
+// If you only want to check two strings for equality, then this function isn't
+// necessary; you can compare the strings directly with ==.
export fn compare(a: str, b: str) int = {
return cmp::strs(&a, &b);
};