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

Unified Diff: utils/pub/utils.dart

Issue 10666042: Reverting 9094 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« no previous file with comments | « utils/pub/system_cache.dart ('k') | utils/tests/pub/pub_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/utils.dart
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart
index 4eb840a7a1777121c63ecbe8c475f6d0b2789279..f0065faa72aa6a82ccc4964da65e318b65515c1b 100644
--- a/utils/pub/utils.dart
+++ b/utils/pub/utils.dart
@@ -16,16 +16,6 @@ class FormatException implements Exception {
String toString() => message;
}
-/** A pair of values. */
-class Pair<E, F> {
- E first;
- F last;
-
- Pair(this.first, this.last);
-
- String toString() => '($first, $last)';
-}
-
// TODO(rnystrom): Move into String?
/** Pads [source] to [length] by adding spaces at the end. */
String padRight(String source, int length) {
@@ -80,18 +70,3 @@ only(Iterable iter) {
assert(!iterator.hasNext());
return obj;
}
-
-/**
- * Replace each instance of [matcher] in [source] with the return value of [fn].
- */
-String replace(String source, Pattern matcher, String fn(Match)) {
- var buffer = new StringBuffer();
- var start = 0;
- for (var match in matcher.allMatches(source)) {
- buffer.add(source.substring(start, match.start()));
- start = match.end();
- buffer.add(fn(match));
- }
- buffer.add(source.substring(start));
- return buffer.toString();
-}
« no previous file with comments | « utils/pub/system_cache.dart ('k') | utils/tests/pub/pub_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698