Trims characters from the right side of the string.
String rightTrim([String? chars]) => (chars != null) ? replaceAll(RegExp('[$chars]+\$'), '') : replaceAll(RegExp(r'\s+$'), '');