Re: g_strsplit variant which filters empty strings from the result
- From: "Milosz Derezynski" <internalerror gmail com>
- To: "Yu Feng" <rainwoodman gmail com>
- Cc: gtk-devel-list gnome org, Morten Welinder <mwelinder gmail com>
- Subject: Re: g_strsplit variant which filters empty strings from the result
- Date: Sun, 13 Apr 2008 03:35:07 +0200
(Sorry for double suceessive post) But seeing that g_strsplit currently doesn't filter empty strings, a check for result[i][1] = 0 would do it.
2008/4/13, Milosz Derezynski <internalerror gmail com>:
An empty string is not a NULL string.
2008/4/10, Yu Feng <rainwoodman gmail com>:
I think you can filter the strv by yourself, with a loop and
if(result[i] == NULL) continue;
On Thu, 2008-04-10 at 22:20 +0300, Alexander Semenov wrote:
> Hi again. :)
>
> On Thu, 2008-04-10 at 15:13 -0400, Morten Welinder wrote:
> > Do you have a case where it would actually make sense to use such
> > as function? The file name case is an awful one:
> >
> > 1. It's unix-specific. On win32 you can see /foo/bar\baz\bof
>
> What do you mean unix special? There is no difference which separator to
> use. On windows I'd like to remove unneeded empty strings too.
>
> > 2. It fails to distinguish "//foo" and "/foo" which, even on unix, are two
> > different file names.
>
> Hmm, I'v just simply made 'cd' to '//home' (is this bash specific?).
>
> > It seems to me that such a function is a tad special for a general library
> > like glib.
> >
> > Morten
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]