removeExtraCharactersOnly method

String removeExtraCharactersOnly(
  1. String charactersToRemove
)

removeExtraCharactersOnly: removes extra characters from a string

Implementation

String removeExtraCharactersOnly(String charactersToRemove) => this?.replaceAll(RegExp('[$charactersToRemove]'), '') ?? "";