Now there is such a check:

assert list == list.sort(false) 

but it is case sensitive ..

How to make that there was no register?

  • sort ({x, y -> x.compareIgnoreCase (y)}) - Sergey
  • list.sort ({x, y -> x.compareIgnoreCase (y)}) Method threw 'org.codehaus.groovy.control.MultipleCompilationErrorsException' exception. - user208404
  • compareToIgnoreCase - Sergey

1 answer 1

solved the problem like this:

  list.toSorted(String.CASE_INSENSITIVE_ORDER)