trimRight function

String trimRight(
  1. String s
)

Removes whitespace from the end of a string.

print(trimRight(' hello ')); // Outputs: ' hello'

Implementation

String trimRight(String s) => s.trimRight();