aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-23 23:03:46 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-23 23:03:46 +0100
commit349a0fc3b123e1dc073628ccc0219a4b8bd1f84f (patch)
treea825bd524126dcaa92c029422e1304e04330c48e
parent5552ce1dbea771a9b4c59ae0a59a8b997714c8f2 (diff)
downloadliberty-349a0fc3b123e1dc073628ccc0219a4b8bd1f84f.tar.gz
liberty-349a0fc3b123e1dc073628ccc0219a4b8bd1f84f.tar.xz
liberty-349a0fc3b123e1dc073628ccc0219a4b8bd1f84f.zip
join_strv() -> strv_join(), take a string argument
-rw-r--r--liberty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liberty.c b/liberty.c
index 9a0d2cc..78e6ffe 100644
--- a/liberty.c
+++ b/liberty.c
@@ -2957,7 +2957,7 @@ cstr_cut_until (const char *s, const char *alphabet)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static char *
-join_strv (const struct strv *v, char delimiter)
+strv_join (const struct strv *v, const char *delimiter)
{
if (!v->len)
return xstrdup ("");
@@ -2966,7 +2966,7 @@ join_strv (const struct strv *v, char delimiter)
str_init (&result);
str_append (&result, v->vector[0]);
for (size_t i = 1; i < v->len; i++)
- str_append_printf (&result, "%c%s", delimiter, v->vector[i]);
+ str_append_printf (&result, "%s%s", delimiter, v->vector[i]);
return str_steal (&result);
}