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

2 lines
81 B
Dart
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
String reverse(String s) => new String.fromCharCodes(s.runes.toList().reversed);