remove method

String remove(
  1. String string
)

Remve prefix and suffix from a string.

Implementation

String remove(String string) {
  if (this == null) {
    throw ArgumentError('string: $this');
  }
  if (this!.isEmpty) {
    return '';
  }
  return this!.removePrefix(string).removeSuffix(string);
}