X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fstring-array.h;h=353ddf5018b8301a9b1e45749fab9b15fb55644a;hb=d29df184317dd127d4ca2f41add35cc72533a465;hp=f3ec0423f7b3410cecbd0f5f6310645a962b7a79;hpb=6f0ba24cc85db195ff3ba8bd4a16dd5440339b8d;p=pspp diff --git a/src/libpspp/string-array.h b/src/libpspp/string-array.h index f3ec0423f7..353ddf5018 100644 --- a/src/libpspp/string-array.h +++ b/src/libpspp/string-array.h @@ -19,6 +19,7 @@ #include #include +#include "libpspp/str.h" /* An unordered array of strings. @@ -32,9 +33,9 @@ struct string_array /* 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 *); @@ -60,7 +61,10 @@ void string_array_terminate_null (struct string_array *); void string_array_shrink (struct string_array *); void string_array_sort (struct string_array *); +void string_array_uniq (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