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

Unified Diff: samples/third_party/dromaeo/common/BenchUtil.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months 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
Index: samples/third_party/dromaeo/common/BenchUtil.dart
diff --git a/samples/third_party/dromaeo/common/BenchUtil.dart b/samples/third_party/dromaeo/common/BenchUtil.dart
index 04520461e6056a2d3675e612052a920b9736a4ec..54d5e9ca23cc125bad9304e2f6029b5908e83604 100644
--- a/samples/third_party/dromaeo/common/BenchUtil.dart
+++ b/samples/third_party/dromaeo/common/BenchUtil.dart
@@ -56,11 +56,11 @@ class BenchUtil {
_inRange(charCode, 'a', 'z') ||
_inRange(charCode, 'A', 'Z');
if (noEscape) {
- sb.add(s[i]);
+ sb.write(s[i]);
} else {
- sb.add('%');
- sb.add(_asDigit((charCode >> 4) & 0xF));
- sb.add(_asDigit(charCode & 0xF));
+ sb.write('%');
+ sb.write(_asDigit((charCode >> 4) & 0xF));
+ sb.write(_asDigit(charCode & 0xF));
}
}
return sb.toString();
@@ -73,11 +73,11 @@ class BenchUtil {
int pos = 0;
for (Match match in new RegExp(pattern).allMatches(s)) {
- sb.add(s.substring(pos, match.start));
- sb.add(replacement(match));
+ sb.write(s.substring(pos, match.start));
+ sb.write(replacement(match));
pos = match.end;
}
- sb.add(s.substring(pos));
+ sb.write(s.substring(pos));
return sb.toString();
}

Powered by Google App Engine
This is Rietveld 408576698