trimRight function

String trimRight(
  1. String str
)

Implementation

String trimRight(String str) => str.replaceAll(RegExp(r'\s+$'), '');