reverse property
String
reverse
Returns the String
reversed.
Example
String foo = 'Hello World';
String reversed = foo.reverse; // returns 'dlrow olleH'
Implementation
String get reverse {
if (this.isBlank) {
return this;
}
var letters = this.split('').toList().reversed;
return letters.reduce((current, next) => current + next);
}