[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Of a bad sort: 1 10 2 3 4 5 6 7 8 9
- To: yost@Yost.com (Dave Yost)
- Subject: Re: Of a bad sort: 1 10 2 3 4 5 6 7 8 9
- From: straz@cambridge.apple.com (Steve Strassmann)
- Date: Mon, 10 Apr 1995 13:36:05 -0400
- Cc: info-mcl@digitool.com
- Sender: owner-info-mcl@digitool.com
>When there is an embedded numeric string at the same position
>in both strings, compare those substrings as if they each occupied
>a single character position.
>
>Has anyone implemented this in lisp?
>Perhaps someone can come up with better names?
A better name might be tokenized-string<, etc. You're basically parsing the
string into tokens, of which multidigit numbers are a special case. This
can of worms also contains international issues (sorting prefixed names
like "van der Waals" or "O'Neil" in a phone book), char set issues (how to
sort accented and non-roman characters), glyph issues (how to sort ligature
characters like "ffi"), etc.
I think Apple's WorldScript protocol (to be supported by MCL 3.0) addresses
all of these (but not embedded numeric tokens!) I don't think it's
available as a portable CL library. WorldScript is documented in Apple's
"Inside Macintosh", volume "Text".