On Monday, July 30, 2012 04:39:26 bearophile wrote:
> Jonathan M Davis:
> > void main()
> > {
> > 
> >     string[] x = ["_100", "_10", "_20"];
> >     sort!"a.length < b.length ? true : a < b"(x);
> >     writeln(x);
> > 
> > }
> > 
> > I get an AssertError about it failing to sort, but the result
> > is correct.
> 
> Take a look at my solution (another thread, it seems), why are
> you comparing the length of the strings?

Otherwise, wouldn't _100 come before _20?

- Jonathan M Davis

Reply via email to