Re: g_strsplit variant which filters empty strings from the result



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



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