From 8644b2724a9f0a4fede2488b2f550b426db8ea74 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 16 Apr 2025 11:31:06 +0200 Subject: [PATCH] (!69) util-strings: drop unused strstrip() Not used anywhere. Signed-off-by: Enrico Weigelt, metux IT consult --- src/util-strings.h | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/util-strings.h b/src/util-strings.h index 8e25dda..90d62f0 100644 --- a/src/util-strings.h +++ b/src/util-strings.h @@ -335,29 +335,3 @@ error: free(result); return -1; } - -/** - * Strip any of the characters in what from the beginning and end of the - * input string. - * - * @return a newly allocated string with none of "what" at the beginning or - * end of string - */ -static inline char * -strstrip(const char *input, const char *what) -{ - char *str, *last; - - str = safe_strdup(&input[strspn(input, what)]); - - last = str; - - for (char *c = str; *c != '\0'; c++) { - if (!strchr(what, *c)) - last = c + 1; - } - - *last = '\0'; - - return str; -}