]> git.ipfire.org Git - pakfire.git/commitdiff
strings: Add a simple function to compare two strings
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Jan 2025 16:19:06 +0000 (16:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Jan 2025 16:19:06 +0000 (16:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/include/pakfire/string.h

index 809bb30ec5d881416990c0306024cc9d7deceae7..5cb123b63e6433e25bb51bf568ed490314f9d2a2 100644 (file)
@@ -62,6 +62,10 @@ int pakfire_string_partition(const char* s, const char* delim, char** s1, char**
 char* pakfire_string_replace(const char* s, const char* pattern, const char* repl);
 char* pakfire_string_join(const char** list, const char* delim);
 
+inline int pakfire_string_equals(const char* s1, const char* s2) {
+       return strcmp(s1, s2) == 0;
+}
+
 /*
        Simple operations, usually used in the linter...
 */