I’m looking for a case-sensitive sort function for a string array because the built-in .sort is case insensitive. Presently the quickest thing I can think of is to shell to Linux Sort command which involves reformatting data into lines and back again plus context-switching overheads. A SortB would be nice but sadly no.
My implementation’s test for empty arrays was not needed because I misinterpreted the warning about NIL in the documentation as applying to empty string arrays when it was only referring to the existence of the delegate code itself. My code although workable was also VBish (old habits die hard) with strings – which in VB are/were reference types that changed to byVals if modified – but in Xojo are not with arrays – see blog by Javier Menendez here.
Once again, thanks Julian for the concept. It saved me heaps of time!