Dim arrText() As Text
arrText.Append "b"
arrText.Append ""
arrText.Append "a"
arrText.Sort() // a, , b > localized order (with String it would have be a, b, )
// this is on a German OS X installation
So it seems that Sort() on a Text array is localized.
The docs for Text say:
Shouldn’t therefore Sort have an parameter list like:
Sort(Optional compareOptions As Integer = 0, Optional locale As Locale = Nil)
I’m looking for comments on the API of the array Sort() method for Text arrays. For example the Split function on Text arrays has the Optional compareOptions As Integer = 0, Optional locale As Locale = Nil parameter list. Shouldn’t Sort have that either?
the TEXT object is new. ( split in the “old framework” has no such option)
CompareOptions is StrComp is “old framework” and is for Case only not encoding
There is no SORT specific to the “new” framework that I can find
operator_compare is useful for your own classes etc but wont help with built in types like TEXT since you can’t override their operator_compare method
Sort might be able to be overloaded with an additional signature that takes parameters like Eli suggests
I’d at least submit a feature request for that