st->ss.length += u8_uctomb (CHAR_CAST (uint8_t *, ds_end (st)), uc, 6);
}
+/* Appends N copies of S to ST. */
+void
+ds_put_substring_multiple (struct string *dst, struct substring src, size_t n)
+{
+ char *p = ds_put_uninit (dst, n * src.length);
+ for (size_t i = 0; i < n; i++)
+ {
+ memcpy (p, src.string, src.length);
+ p += src.length;
+ }
+}
+
/* If relocation has been enabled, replace ST,
with its relocated version */
void
void ds_put_unichar (struct string *, ucs4_t uc);
void ds_put_cstr (struct string *, const char *);
void ds_put_substring (struct string *, struct substring);
+void ds_put_substring_multiple (struct string *, struct substring, size_t n);
void ds_put_vformat (struct string *st, const char *, va_list)
PRINTF_FORMAT (2, 0);
void ds_put_c_vformat (struct string *st, const char *, va_list)