Sorting array of string arrays by an element in the string array

neal via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 21 17:32:54 PDT 2014


Just curious if this is possible. I have some data on different 
countries that i have stored in a multidimensional array called 
data[][]. What I want to do is sort data[][] by population which 
happens to be stored in data[i][4] where i is the index to 
iterate from country to country.

I would like something like this:

sort!("a>b")(data[][4]);

Anybody have any suggestions?



More information about the Digitalmars-d-learn mailing list