Re: Bug#15026: g_strsplit inconsistency



On Thu, 26 Oct 2000, Sebastian Wilhelmi wrote:

> Hi Dan,
> 
> > g_strsplit behaves inconsistently with empty strings:
> > 
> >         g_strsplit (":x:x", ":", 0) -> "", "x", "x", NULL
> > 
> >         g_strsplit ("x::x", ":", 0) -> "x", "", "x", NULL
> > 
> >         g_strsplit ("x:x:", ":", 0) -> "x", "x", NULL
> > 
> > (I think this is a bug, but if you disagree, I think it should at
> > least be documented.)
> 
> I tend to agree, that this is a bug. Unless noone objects, I'm going to commit
> the attached patch, that solves that.

ok, hard to tell from the patch, i assume it does:

 g_strsplit ("x:x:", ":", 0) -> "x", "x", "", NULL

right? if so, please commit.

> 
> Bye,
> Sebastian

---
ciaoTJ





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