Extend split_str() for multiple split chars

This commit is contained in:
2015-11-15 15:56:10 +01:00
parent f11635ed7f
commit 9b22d72fd1
2 changed files with 6 additions and 6 deletions

View File

@@ -3965,7 +3965,7 @@ on_irc_autojoin_timeout (void *user_data)
{
struct str_vector v;
str_vector_init (&v);
split_str (autojoin, ',', &v);
split_str (autojoin, ",", &v);
for (size_t i = 0; i < v.len; i++)
{
irc_send (s, "JOIN :%s", v.vector[i]);
@@ -7311,7 +7311,7 @@ handle_command_set_add
bool result = false;
struct str_vector items;
str_vector_init (&items);
split_str (item->value.string.str, ',', &items);
split_str (item->value.string.str, ",", &items);
if (items.len == 1 && !*items.vector[0])
str_vector_reset (&items);
@@ -7334,7 +7334,7 @@ handle_command_set_remove
bool result = false;
struct str_vector items;
str_vector_init (&items);
split_str (item->value.string.str, ',', &items);
split_str (item->value.string.str, ",", &items);
if (items.len == 1 && !*items.vector[0])
str_vector_reset (&items);