input compacted and upper-cased, for a charset that admits letters too.
input
String compactUpperCase(String input) => compact(input).toUpperCase();