]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Remove unused function trim_last_field()
authorJohan Malm <jgm323@gmail.com>
Thu, 25 Sep 2025 18:35:22 +0000 (19:35 +0100)
committerJohn Lindgren <john@jlindgren.net>
Fri, 26 Sep 2025 14:41:21 +0000 (10:41 -0400)
include/common/string-helpers.h
src/common/string-helpers.c

index 0509d33c9b2f8272979a1b5ccc847d9ef5c7505b..35c994b23ab065553078f12252358d14cb725735 100644 (file)
@@ -15,15 +15,6 @@ bool string_null_or_empty(const char *s);
  */
 bool str_space_only(const char *s);
 
-/**
- * trim_last_field() - Trim last field of string splitting on provided delim
- * @buf: string to trim
- * @delim: delimitator
- *
- * Example: With delim='_' and buf="foo_bar_baz" the return value is "foo_bar"
- */
-void trim_last_field(char *buf, char delim);
-
 /**
  * string_strip - strip white space left and right
  * Note: this function does a left skip, so the returning pointer cannot be
index a0d730344b800f62318c63358a2a77f471c344ee..13fe6f6864460441794a2b7dea07c82741c27d4f 100644 (file)
@@ -20,15 +20,6 @@ string_null_or_empty(const char *s)
        return !s || !*s;
 }
 
-void
-trim_last_field(char *buf, char delim)
-{
-       char *p = strrchr(buf, delim);
-       if (p) {
-               *p = '\0';
-       }
-}
-
 static void
 rtrim(char *s)
 {