Posted By

albertoprb on 01/13/11


Tagged

sort order


Versions (?)

Sort list of objects


 / Published in: Groovy
 

  1. assert ['a1', 'A2', 'a3'] == ['A2','a3', 'a1'].sort { a, b -> a.compareToIgnoreCase b }

Report this snippet  

You need to login to post a comment.