api.dart.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. Learn more.
The string without any trailing whitespace.
As trim, but only removes trailing whitespace.
final string = ' Dart '.trimRight(); print(string); // ' Dart'
String trimRight();