operator - method

String? operator -(
  1. String s
)

Subtracts-removes a text from a String.

Implementation

String? operator -(String s) {
  if (this == null) {
    return null;
  }
  if (this!.isEmpty) {
    return this;
  }
  return this!.replaceAll(s, '');
}