| Index: sdk/lib/core/string.dart
|
| diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
|
| index e4a1c1d5c9712f50e45c9578eaa7e1e063ddb3d1..625446fb8df99ec859c2052dbd6f32b0138ebb1b 100644
|
| --- a/sdk/lib/core/string.dart
|
| +++ b/sdk/lib/core/string.dart
|
| @@ -414,7 +414,7 @@ abstract class String implements Comparable<String>, Pattern {
|
| bool contains(Pattern other, [int startIndex = 0]);
|
|
|
| /**
|
| - * Returns a new string in which the first occurence of [from] in this string
|
| + * Returns a new string in which the first occurence of [from] in this string
|
| * is replaced with [to], starting from [startIndex]:
|
| *
|
| * '0.0001'.replaceFirst(new RegExp(r'0'), ''); // '.0001'
|
| @@ -423,6 +423,20 @@ abstract class String implements Comparable<String>, Pattern {
|
| String replaceFirst(Pattern from, String to, [int startIndex = 0]);
|
|
|
| /**
|
| + * Replace the first occurence of [from] in this string.
|
| + *
|
| + * Returns a new string, which is this string
|
| + * except that the first match of [pattern], starting from [startIndex],
|
| + * is replaced by the result of calling [replace] with the match object.
|
| + *
|
| + * 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.
|
| + */
|
| + String replaceFirstMapped(Pattern from, String replace(Match match),
|
| + [int startIndex = 0]);
|
| +
|
| + /**
|
| * Replaces all substrings that match [from] with [replace].
|
| *
|
| * Returns a new string in which the non-overlapping substrings matching
|
|
|