| Index: runtime/lib/string_base.dart
|
| ===================================================================
|
| --- runtime/lib/string_base.dart (revision 16325)
|
| +++ runtime/lib/string_base.dart (working copy)
|
| @@ -219,10 +219,11 @@
|
| Iterator iterator = pattern.allMatches(this).iterator();
|
| if (iterator.hasNext) {
|
| Match match = iterator.next();
|
| - buffer.add(this.substring(startIndex, match.start)).add(replacement);
|
| + buffer..add(this.substring(startIndex, match.start))
|
| + ..add(replacement);
|
| startIndex = match.end;
|
| }
|
| - return buffer.add(this.substring(startIndex)).toString();
|
| + return (buffer..add(this.substring(startIndex))).toString();
|
| }
|
|
|
| String replaceAll(Pattern pattern, String replacement) {
|
| @@ -235,10 +236,11 @@
|
| StringBuffer buffer = new StringBuffer();
|
| int startIndex = 0;
|
| for (Match match in pattern.allMatches(this)) {
|
| - buffer.add(this.substring(startIndex, match.start)).add(replacement);
|
| + buffer..add(this.substring(startIndex, match.start))
|
| + ..add(replacement);
|
| startIndex = match.end;
|
| }
|
| - return buffer.add(this.substring(startIndex)).toString();
|
| + return (buffer..add(this.substring(startIndex))).toString();
|
| }
|
|
|
| /**
|
|
|