Sorting in GWT based on String
gwt, java, sorting
Solution
This is the bad boy you want: String.CASE_INSENSITIVE_ORDER
Problem
I need to sort a List based on MyDto.name in client-side GWT code. Currently I am trying to do this... ``` Collections.sort(_myDtos, new Comparator<MyDto>() { @Override public int compare(MyDto o1, MyDto o2) { return o1.getName().compareTo(o2.getName()); } }); ``` Unfortunately the sorting is not what I was expecting as anything in upper-case is before lower-case. For example ESP comes before aESP.