reverse property

String get reverse

Returns the reversed version of this string.

Example: 'hello'.reverse -> 'olleh'.

Implementation

String get reverse => isNotEmpty ? substring(1).reverse + this[0] : this;