replace method

String replace(
  1. String oldValue,
  2. String newValue
)

replace: replaces all occurrences of a substring

Implementation

String replace(String oldValue, String newValue) {
  return this?.replaceAll(oldValue, newValue) ?? "";
}