Re: About the behaviour of g_strsplit_set

Seems logical to me - in the middle of the string you have two
delimiter characters together, with an empty string between them.

So I would expect for example: g_strsplit_set ("abc://:def", ":/", -1)
to return "abc","","","","def"


On Tue, Jan 15, 2013 at 2:15 PM, Alejandro T. Colombini
<atcolombini gmail com> wrote:
> 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
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org

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