trimRight method

String? trimRight()

The string without any trailing whitespace.

As trim, but only removes trailing whitespace.

final string = ' Dart '.trimRight();
print(string); // ' Dart'

Implementation

String? trimRight() => value?.trimRight();