reversedSortedString function

String reversedSortedString(
  1. String s
)

Sort String in descending order.

Implementation

String reversedSortedString(String s) {
  List<int> chars = List.from(s.codeUnits);
  chars.sort();
  return String.fromCharCodes(chars.reversed);
}