replaceFirstMapped abstract method

String replaceFirstMapped(Pattern from, String replace(Match match), [ int startIndex = 0 ])

Replace the first occurrence of from in this string.

Returns a new string, which is this string except that the first match of from, starting from startIndex, is replaced by the result of calling replace with the match object.

The optional startIndex is by default set to 0. If provided, it must be an integer in the range [0 .. len], where len is this string's length.

If the value returned by calling replace is not a String, it is converted to a String using its toString method, which must then return a string.

Source

String replaceFirstMapped(Pattern from, String replace(Match match),
    [int startIndex = 0]);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/String/replaceFirstMapped.html