garray: implement ga_concat_strings_sep

A generalized version of ga_concat_strings that can handle any separator.
Reimplement ga_concat_strings on top of it.
This commit is contained in:
Nicolas Hillegeer
2014-04-26 19:49:02 +02:00
committed by Thiago de Arruda
parent cf68eda287
commit 104000eff6
2 changed files with 37 additions and 20 deletions

View File

@@ -20,6 +20,8 @@ void ga_clear(garray_T *gap);
void ga_clear_strings(garray_T *gap);
void ga_init(garray_T *gap, int itemsize, int growsize);
void ga_grow(garray_T *gap, int n);
char_u *ga_concat_strings_sep(const garray_T *gap, const char *sep)
FUNC_ATTR_NONNULL_RET;
char_u *ga_concat_strings(garray_T *gap) FUNC_ATTR_NONNULL_RET;
void ga_remove_duplicate_strings(garray_T *gap);
void ga_concat(garray_T *gap, char_u *s);