zkey: Add helper functions for comma separated string handling

Comma separated strings are used in property values to store
multiple values in one property. These helper functions allow to
work with such comma separated strings.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Ingo Franzki
2018-02-02 11:11:55 +01:00
committed by Jan Höppner
parent 5e24f74fde
commit a090a1ffe8
2 changed files with 226 additions and 0 deletions
+12
View File
@@ -33,4 +33,16 @@ int properties_save(struct properties *properties, const char *filename,
int properties_load(struct properties *properties, const char *filename,
bool check_integrity);
char *str_list_combine(const char **strings);
char **str_list_split(const char *str_list);
unsigned int str_list_count(const char *str_list);
char *str_list_add(const char *str_list, const char *str);
char *str_list_remove(const char *str_list, const char *str);
void str_list_free_string_array(char **strings);
#endif