lib/timeutils: add strxxx_iso() functions

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2016-05-11 15:31:02 +02:00
parent 627258104b
commit 3c201431ee
5 changed files with 117 additions and 1 deletions

View file

@ -816,6 +816,23 @@ char *strappend(const char *s, const char *suffix)
return strnappend(s, suffix, suffix ? strlen(suffix) : 0);
}
char *strfappend(const char *s, const char *format, ...)
{
va_list ap;
char *val, *res;
int sz;
va_start(ap, format);
sz = vasprintf(&val, format, ap);
va_end(ap);
if (sz < 0)
return NULL;
res = strnappend(s, val, sz);
free(val);
return res;
}
static size_t strcspn_escaped(const char *s, const char *reject)
{