removeAll method

  1. @useResult
String removeAll(
  1. Pattern? pattern
)

Returns a new string with all occurrences of pattern removed.

Implementation

@useResult
String removeAll(Pattern? pattern) {
  if (pattern == null) {
    return this;
  }

  return replaceAll(pattern, '');
}