About the behaviour of g_strsplit_set



Hi,
  I'm using the GLib function g_strsplit_set and I found its behaviour
is not what I expected when two of the symbols in the given set are
found together. For instance, following the examples in the
documentation: g_strsplit_set ("abc:/def", ":/", -1) will return a
NULL-terminated vector containing the three strings "abc", "" and "def"
instead of the two strings "abc" and "def" that I would expect.

  As I read in the gtk-devel-list it was a bug in g_strsplit producing
this kind of results back in 2000 I didn't know if this was a bug also
in g_strsplit_set or the expected result for this function.

  If this is the expected result, can someone explain why?

  By the way, i'm using the GLib version packaged in Debian GNU/Linux
Wheezy so maybe this issue has changed since this version was released.

Thanks,
  Alex




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]