One of the joys of Sib 6 and later is Dictionaries, which among other
things, we do a very fast sort for you. If you enter text as the key of an
dictionary and then read the keys out, they appear in sorted order. It turns
out to be a case insensitive order. I was trying to find a character in the
" ascii range" (32 to 265) that would sort after the letters.
There are none. Everything sorts before the letters. Here is a bit of code I
wrote to test this, and the results, FWIW.
What is mildly interesting to me is that the upper and lower case for a
given letter may be in different orders. We Have Aa Bb Cc but from dD on,
We have the lower case letter sorting before the upper. No big deal mostly,
but one would expect consistency. Once the upper 128 chars come in the accented letters fill in as well.
dict = CreateDictionary();
for i = 32 to 256
str = Chr(i) & " " & i;
dict [str] = i;
for each Name name in dict
trace(name); // we will see the character, a space, and the index of