}
return true;
}
+
+char *
+svec_join(const struct svec *svec, const char *delimiter)
+{
+ struct ds ds;
+ size_t i;
+
+ ds_init(&ds);
+ for (i = 0; i < svec->n; i++) {
+ if (i) {
+ ds_put_cstr(&ds, delimiter);
+ }
+ ds_put_cstr(&ds, svec->names[i]);
+ }
+ return ds_cstr(&ds);
+}
void svec_print(const struct svec *svec, const char *title);
void svec_parse_words(struct svec *svec, const char *words);
bool svec_equal(const struct svec *, const struct svec *);
+char *svec_join(const struct svec *, const char *delimiter);
#endif /* svec.h */