+const char *wrbuf_cstr(WRBUF b)
+{
+ wrbuf_write(b, "", 1); /* '\0'-terminate as well */
+ (b->pos)--; /* don't include '\0' in count */
+ return b->buf;
+}
+
+void wrbuf_cut_right(WRBUF b, size_t no_to_remove)
+{
+ if (no_to_remove > b->pos)
+ no_to_remove = b->pos;
+ b->pos = b->pos - no_to_remove;
+}
+