regExpReplaceAllMapped function

String regExpReplaceAllMapped(
  1. Object? regExp,
  2. String s,
  3. String replace(
    1. Match match
    )
)

Uses regExp to replace matches at s, substituting with replace Function results.

Implementation

String regExpReplaceAllMapped(
    Object? regExp, String s, String Function(Match match) replace) {
  var theRegExp = parseRegExp(regExp);
  return theRegExp != null ? s.replaceAllMapped(theRegExp, replace) : s;
}