diff options
author | wm4 <wm4@nowhere> | 2012-09-29 18:08:47 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-03 03:17:53 +0200 |
commit | 7c04542e09f34d3c0b1240d47bb518e26d5aaf07 (patch) | |
tree | 97945b5f0e45d3509e1e89d931b5747e8b1631b7 /bstr.h | |
parent | d079395c5d33749422e730697092f7d8e2bb3263 (diff) | |
download | mpv-7c04542e09f34d3c0b1240d47bb518e26d5aaf07.tar.bz2 mpv-7c04542e09f34d3c0b1240d47bb518e26d5aaf07.tar.xz |
bstr: add bstr_equals/bstr_equals0 utility function
Diffstat (limited to 'bstr.h')
-rw-r--r-- | bstr.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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)); |