diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:20:02 +0000 |
commit | 58daab21cd043e1dc37024a7f99b396788372918 (patch) | |
tree | 96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /libnetdata/string/string.h | |
parent | Releasing debian version 1.43.2-1. (diff) | |
download | netdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz netdata-58daab21cd043e1dc37024a7f99b396788372918.zip |
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/string/string.h')
-rw-r--r-- | libnetdata/string/string.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libnetdata/string/string.h b/libnetdata/string/string.h index 70840ee9a..ba0e3876b 100644 --- a/libnetdata/string/string.h +++ b/libnetdata/string/string.h @@ -13,7 +13,6 @@ STRING *string_dup(STRING *string); void string_freez(STRING *string); size_t string_strlen(STRING *string); const char *string2str(STRING *string) NEVERNULL; -int string_strcmp(STRING *string, const char *s); // keep common prefix/suffix and replace everything else with [x] STRING *string_2way_merge(STRING *a, STRING *b); @@ -24,6 +23,10 @@ static inline int string_cmp(STRING *s1, STRING *s2) { return (s1 == s2)?0:strcmp(string2str(s1), string2str(s2)); } +static inline int string_strcmp(STRING *string, const char *s) { + return strcmp(string2str(string), s); +} + void string_statistics(size_t *inserts, size_t *deletes, size_t *searches, size_t *entries, size_t *references, size_t *memory, size_t *duplications, size_t *releases); int string_unittest(size_t entries); |