* lib: add mu_str_parse_arglist + unit tests

This commit is contained in:
djcb
2013-05-20 05:14:35 +03:00
parent 2f5d6e246b
commit 59f855b39b
3 changed files with 161 additions and 3 deletions

View File

@ -281,6 +281,21 @@ GSList* mu_str_to_list (const char *str, char sepa, gboolean strip);
GSList* mu_str_esc_to_list (const char *str);
/**
* Parse a list of <key>:<value> arguments, where <value> supports
* quoting and escaping.
*
* @param args a list of arguments
* @param err receives error information
*
* @return a hash table with key->value, or NULL in case of
* error. Free with g_hash_table_destroy.
*/
GHashTable* mu_str_parse_arglist (const char *args, GError **err)
G_GNUC_WARN_UNUSED_RESULT;
/**
* free a GSList consisting of allocated strings
*