Print int[string] sorted by Value

Paul phshaffer at gmail.com
Wed Oct 28 15:15:40 UTC 2020


per the D sample wc2.d....
size_t[string] dictionary;  <-is printed by...
.....
foreach (word1; dictionary.keys.sort) writef ....etc

I want to print the dictionary sorted by value not key.  I can 
write an algorithm but is there a library method(s) I can use to 
iterate through the array sorted by decreasing values?

Thanks for your time.




More information about the Digitalmars-d-learn mailing list