#include <stdbool.h>
#include <stddef.h>
+#include "libpspp/str.h"
/* An unordered array of strings.
/* Suitable for use as the initializer for a string_array named ARRAY. Typical
usage:
- struct string_array array = STRING_ARRAY_INITIALIZER (array);
+ struct string_array array = STRING_ARRAY_INITIALIZER;
STRING_ARRAY_INITIALIZER is an alternative to calling string_array_init. */
-#define STRING_ARRAY_INITIALIZER(ARRAY) { NULL, 0, 0 }
+#define STRING_ARRAY_INITIALIZER { NULL, 0, 0 }
void string_array_init (struct string_array *);
void string_array_clone (struct string_array *, const struct string_array *);
void string_array_shrink (struct string_array *);
void string_array_sort (struct string_array *);
+void string_array_uniq (struct string_array *);
+bool string_array_equal (const struct string_array *,
+ const struct string_array *);
+bool string_array_equal_case (const struct string_array *,
+ const struct string_array *);
+
+void string_array_parse (struct string_array *, struct substring string,
+ struct substring delimiters);
char *string_array_join (const struct string_array *, const char *separator);
/* Macros for conveniently iterating through a string_array, e.g. to print all