The StringSort Library provides three functions that allow an array of strings to be sorted. These functions are called 'SortStringsAtoZ', 'SortStringsZtoA' and 'ScrambleStrings', hopefully their names give away their function!
Included in the package is a file that documents how to use this library with your scripts. Once installed you will find it at 'world/dispatcher/downloads/kuid2 116387 28 1/stringsortref.htm' in your Trainz folder.
Please ensure that you read the licence.txt file that is in the same location.