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

2 lines
81 B
Dart
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
String reverse(String s) => new String.fromCharCodes(s.runes.toList().reversed);