replaceMany method
Replaces all occurrences of the given pattern
with the replacement
String
.
Implementation
String replaceMany(Iterable<Pattern> from, [String to = ""]) {
if (isEmpty) return blankIfNull;
String result = this;
for (var pattern in from) {
result = result.replaceAll(pattern, to);
}
return result;
}