replaceMapped function

StreamTransformer<String, String> replaceMapped(
  1. String regexp,
  2. String replace(
    1. Match match
  3. {bool all = false,
  4. bool caseSensitive = true,
  5. bool unicode = false,
  6. bool dotAll = false}

Returns a transformer that replaces matches of regexp with the result of calling replace.

By default, only replaces the first match per line. If all is true, replaces all matches in each line instead.

The caseSensitive, unicode, and dotAll flags are the same as for new RegExp.


StreamTransformer<String, String> replaceMapped(
        String regexp, String replace(Match match),
        {bool all = false,
        bool caseSensitive = true,
        bool unicode = false,
        bool dotAll = false}) =>
        (stream) => stream.replaceMapped(regexp, replace,
            all: all,
            caseSensitive: caseSensitive,
            unicode: unicode,
            dotAll: dotAll));