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

Unified Diff: pkg/intl/lib/bidi_utils.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 | « no previous file | runtime/lib/string_base.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/bidi_utils.dart
===================================================================
--- pkg/intl/lib/bidi_utils.dart (revision 16325)
+++ pkg/intl/lib/bidi_utils.dart (working copy)
@@ -244,11 +244,11 @@
var startIndex = 0;
Match match = new RegExp('<\\w+').firstMatch(html);
if (match != null) {
- buffer.add(html.substring(
- startIndex, match.end)).add(' dir=$direction');
+ buffer..add(html.substring(startIndex, match.end))
+ ..add(' dir=$direction');
startIndex = match.end;
}
- return buffer.add(html.substring(startIndex)).toString();
+ return (buffer..add(html.substring(startIndex))).toString();
}
// '\n' is important for FF so that it won't incorrectly merge span groups.
return '\n<span dir=$direction>$html</span>';
@@ -298,11 +298,13 @@
var startIndex = 0;
Iterable matches = regexp.allMatches(str);
for (Match match in matches) {
- buffer.add(str.substring(startIndex, match.start)).add(before);
- buffer.add(str.substring(match.start, match.end)).add(after);
+ buffer..add(str.substring(startIndex, match.start))
+ ..add(before)
+ ..add(str.substring(match.start, match.end))
+ ..add(after);
startIndex = match.end;
}
- return buffer.add(str.substring(startIndex)).toString();
+ return (buffer..add(str.substring(startIndex))).toString();
}
/**
« no previous file with comments | « no previous file | runtime/lib/string_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698