string-helpers.c: add string_empty()

This commit is contained in:
Johan Malm 2024-01-19 19:06:07 +00:00 committed by Johan Malm
parent 8c9be2f0d1
commit c066821046
9 changed files with 27 additions and 14 deletions

View file

@ -6,6 +6,12 @@
#include "common/mem.h"
#include "common/string-helpers.h"
bool
string_null_or_empty(const char *s)
{
return !s || !*s;
}
void
trim_last_field(char *buf, char delim)
{