RE: Re: Repobrowser - Numeric order filename sorting
From: Gerasimov, Ivan <Ivan.Gerasimov_at_transas.com>
Date: 2006-04-12 19:31:30 CEST
Hello, Stefan!
> But I had to modify the function. You see, compare functions don't just
Yes, I see that. I've been testing the sample function with STL's sort, that's why I made it return Boolean.
> Now, your new function doesn't work. It first looked like it did, then I
That's surprising! I've tried to test as heavily as I could, before I posted it.
> First I had
It only checks for _leading_ zeros. To make sort order more stable, I decided to place string with same numeric value but with less leading zeros earlier. The number with leading zeros looks bigger after all :-)
> Also, you don't really parse the numbers anymore. In the first function,
Yes, I've mentioned that in my letter:
IG>> Additionally, I eliminated the need to convert literal number to
> There's nothing like this anymore in your new function.
The idea is that having two strings, which consist only of numbers, we can compare them without converting to ints:
> Maybe you can just start over from where I put your first function
I've already checked it out and started rebuilding it. As soon as I make it work, I'll post a patch.
Sorry for being a bit slow, have to do lots of other work at the same time :-(
Sincerely yours,
---------------------------------------------------------------------
|
This is an archived mail posted to the TortoiseSVN Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.