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

Unified Diff: runtime/lib/integers.dart

Issue 10937011: Bug cleanup: unify on allowing radices from 2 to 36 in (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: runtime/lib/integers.dart
diff --git a/runtime/lib/integers.dart b/runtime/lib/integers.dart
index 09a3f689944c5aa50f5b775696db928a8cf392e3..d50f0ddb3009275489ce7467be2770bd414d4928 100644
--- a/runtime/lib/integers.dart
+++ b/runtime/lib/integers.dart
@@ -154,8 +154,10 @@ class _IntegerImplementation {
}
String toRadixString(int radix) {
final table = const ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
- "a", "b", "c", "d", "e", "f"];
- if ((radix <= 1) || (radix > 16)) {
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
+ "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
+ "u", "v", "w", "x", "y", "z"];
+ if ((radix <= 1) || (radix > 36)) {
throw "Bad radix: $radix";
}
final bool isNegative = this < 0;

Powered by Google App Engine
This is Rietveld 408576698