str: New function ds_steal_cstr.
[pspp-builds.git] / src / libpspp / str.h
index b057c2bd62028b2a72ba2c9e4e4b019d49a3c7e5..0b57f7364e07816400b0d90f80e12376f219b821 100644 (file)
@@ -20,6 +20,7 @@
 #include <assert.h>
 #include <stdarg.h>
 #include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -177,6 +178,7 @@ bool ds_tokenize (const struct string *src, struct substring delimiters,
                   size_t *save_idx, struct substring *token);
 void ds_rpad (struct string *, size_t length, char pad);
 void ds_set_length (struct string *, size_t new_length, char pad);
+void ds_remove (struct string *, size_t start, size_t n);
 
 /* Extracting substrings. */
 struct substring ds_ss (const struct string *);
@@ -201,6 +203,7 @@ char *ds_xstrdup (const struct string *);
 
 size_t ds_capacity (const struct string *);
 char *ds_cstr (const struct string *);
+char *ds_steal_cstr (struct string *);
 
 /* File input. */
 bool ds_read_line (struct string *, FILE *, size_t max_length);
@@ -222,4 +225,10 @@ char *ds_put_uninit (struct string *st, size_t incr);
 /* calls relocate from gnulib on ST */
 void ds_relocate (struct string *st);
 
+
+void u8_buf_copy_rpad (uint8_t *dst, size_t dst_size,
+                      const uint8_t *src, size_t src_size,
+                      char pad);
+
+
 #endif /* str_h */