Sort list of objects


/ Published in: Groovy
Save to your folder(s)



Copy this code and paste it in your HTML
  1. assert ['a1', 'A2', 'a3'] == ['A2','a3', 'a1'].sort { a, b -> a.compareToIgnoreCase b }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.