Sorting an Array

Sean Kelly sean at f4.ca
Tue Jul 10 08:12:21 PDT 2007


okibi wrote:
> Is there an easy way to sort an array with elements such as "12 - Some text" or "241 - Other Text"?
> 
> I want to sort in order of the numbers. Is this possible?

You need a sort routine with a custom comparator.  Tango has one in 
tango.core.Array.  Unfortunately, I don't think there is such a routine 
in Phobos.


Sean


More information about the Digitalmars-d-learn mailing list