projects
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d60ad9
)
Add helper for case-independent string equality checks
author
Matthias Klumpp
<matthias@tenstral.net>
Sat, 10 Oct 2020 02:40:23 +0000
(
04:40
+0200)
committer
Michael Biebl
<biebl@debian.org>
Wed, 3 Feb 2021 16:11:39 +0000
(16:11 +0000)
(cherry picked from commit
bd47b0dac4a1ff6e686c99b9958693e86d44007b
)
Gbp-Pq: Name Add-helper-for-case-independent-string-equality-checks.patch
src/basic/string-util.h
patch
|
blob
|
history
diff --git
a/src/basic/string-util.h
b/src/basic/string-util.h
index fdd3ce7363123fa257ecfadfefd0a9fde0c2931d..6c99335b0084813f96a54bcea0cac94cd0cf856b 100644
(file)
--- a/
src/basic/string-util.h
+++ b/
src/basic/string-util.h
@@
-33,6
+33,10
@@
static inline bool streq_ptr(const char *a, const char *b) {
return strcmp_ptr(a, b) == 0;
}
+static inline bool strcaseeq_ptr(const char *a, const char *b) {
+ return strcasecmp_ptr(a, b) == 0;
+}
+
static inline char* strstr_ptr(const char *haystack, const char *needle) {
if (!haystack || !needle)
return NULL;