Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: runtime/lib/string_base.dart

Issue 11645019: Fixed Issue 7508: Many StringBuffer methods return StringBuffer, but should be void. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/intl/lib/bidi_utils.dart ('k') | sdk/lib/core/string_buffer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
/**
« no previous file with comments | « pkg/intl/lib/bidi_utils.dart ('k') | sdk/lib/core/string_buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698