I wanted to sort a range of tokens alphabetically depending on their case size.

At the moment a doesn't work because it does this:

Code:
$sorttok(z A b a Z y,32,a) > A a b y z Z


What I'm proposing is something like this:

Code:
$sorttok(z A b a Z y,32,A) > a b y z A Z
$sorttok(z A b a Z y,32,Ar) > Z A z y b a


What do you do at the end of the world? Are you busy? Will you save us?