This functionality is only available for certain module packages.

You are here: Reference > SCRIPTING > General methods > Lexicographic sorting of strings with proper treatment of numbers

Lexicographic sorting of strings with proper treatment of numbers

EEC is provided with an own comparator (DefaultStringComparator), which lexicographic sorts strings. This enables the correct treatment of numbers. This allows strings of the type Text1, Text2, ... , Text10, Text11 to be sorted correctly. This comparator is also used in the formula language to sort string lists.

The following example code shows the sorting of string lists and of string arrays: