removeExtraCharactersFromEnd method

String removeExtraCharactersFromEnd(
  1. String charactersToRemove
)

removeExtraCharactersFromEnd: removes extra characters from the end of a string

Implementation

String removeExtraCharactersFromEnd(String charactersToRemove) =>
    this?.replaceFirst(RegExp('[$charactersToRemove]+\$'), '') ?? "";