Remove unused function trim_last_field()

This commit is contained in:
Johan Malm 2025-09-25 19:35:22 +01:00 committed by John Lindgren
parent 34e52a40c7
commit ee87b4fc30
2 changed files with 0 additions and 18 deletions

View 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

View 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)
{