summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bstr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/bstr.h b/bstr.h
index 5f04a75db8..fab9be5814 100644
--- a/bstr.h
+++ b/bstr.h
@@ -142,6 +142,16 @@ static inline int bstrcmp0(struct bstr str1, const char *str2)
return bstrcmp(str1, bstr0(str2));
}
+static inline bool bstr_equals(struct bstr str1, struct bstr str2)
+{
+ return bstrcmp(str1, str2) == 0;
+}
+
+static inline bool bstr_equals0(struct bstr str1, const char *str2)
+{
+ return bstrcmp(str1, bstr0(str2)) == 0;
+}
+
static inline int bstrcasecmp0(struct bstr str1, const char *str2)
{
return bstrcasecmp(str1, bstr0(str2));