diff options
Diffstat (limited to 'common/glib-helper.c')
| -rw-r--r-- | common/glib-helper.c | 24 | 
1 files changed, 24 insertions, 0 deletions
| diff --git a/common/glib-helper.c b/common/glib-helper.c index cb8f35c4..771b9d76 100644 --- a/common/glib-helper.c +++ b/common/glib-helper.c @@ -277,3 +277,27 @@ gchar *bt_list2string(GSList *list)  	return str;  } + +GSList *bt_string2list(const gchar *str) +{ +	GSList *l = NULL; +	gchar **uuids; +	int i = 0; + +	if (!str) +		return NULL; + +	/* FIXME: eglib doesn't support g_strsplit */ +	uuids = g_strsplit(str, " ", 0); +	if (!uuids) +		return NULL; + +	while (uuids[i]) { +		l = g_slist_append(l, uuids[i]); +		i++; +	} + +	g_free(uuids); + +	return l; +} | 
