diff options
Diffstat (limited to 'rpmio/argv.c')
-rw-r--r-- | rpmio/argv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rpmio/argv.c b/rpmio/argv.c index 0ff05acf0..ff11f5c4a 100644 --- a/rpmio/argv.c +++ b/rpmio/argv.c @@ -197,3 +197,15 @@ int argvSplit(ARGV_t * argvp, const char * str, const char * seps) *argvp = argv; return 0; } + +char *argvJoin(ARGV_const_t argv, const char *sep) +{ + char *dest = NULL; + char * const *arg; + + for (arg = argv; *arg; arg++) { + rstrscat(&dest, *arg, *(arg+1) ? sep : "", NULL); + } + return dest; +} + |