RosettaCodeData/Task/Reverse-a-string/Dart/reverse-a-string-1.dart

2 lines
81 B
Dart

String reverse(String s) => new String.fromCharCodes(s.runes.toList().reversed);