On 25.06.2007 00:57 CE(S)T, [EMAIL PROTECTED] wrote:
> Yves Goergen <[EMAIL PROTECTED]> wrote:
>> Oh, well, I just realised that this will only sort numbers "naturally"
>> at the beginning of strings, but not in the middle or at the end. It
>> will be a bit more complex to do that. Maybe I find a sort/compare
>> algorithm for it. But at least I know now that it's easy to use. :)

> Check out the "sortStrCmp()" function in older versions of
> SQLite version 2 in the util.c source file.  See, for example,
> 
>    http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/util.c&v=1.42
> 
> I think the sortStrCmp() function does what you are after.

Okay, first thank you for pointing me on this. But even with the good
documentation about the state machine implemented, this surely is highly
optimised C "hack"* code that I probably won't understand so soon.
Another problem is that I can't easily translate this into C# because
there's no such thing as pointers to strings (character arrays).

I'll keep on searching for a function for that. Maybe, given enough
time, I'll come up with my own one... Some day... ;-)

*) I mean, come on, using negative array indices on pointers...
   cb = b[-1]; ;-)

-- 
Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]>
Visit my web laboratory at http://beta.unclassified.de

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to