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

Unified Diff: pkg/intl/lib/number_format.dart

Issue 12262030: Stop using deprecated charCodeAt in Intl (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « pkg/intl/lib/bidi_utils.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/number_format.dart
diff --git a/pkg/intl/lib/number_format.dart b/pkg/intl/lib/number_format.dart
index 4f75d634e81d52b9a12c18111eca5ad042e1e008..76f8afaf2f19eed3309accde707cf067e1dd12c6 100644
--- a/pkg/intl/lib/number_format.dart
+++ b/pkg/intl/lib/number_format.dart
@@ -258,10 +258,14 @@ class NumberFormat {
}
/** Returns the code point for the character '0'. */
- int get _zero => '0'.charCodes[0];
+ int get _zero => '0'.codeUnits.first;
/** Returns the code point for the locale's zero digit. */
- int get _localeZero => symbols.ZERO_DIGIT.charCodeAt(0);
+ // Note that there is a slight risk of a locale's zero digit not fitting
+ // into a single code unit, but it seems very unlikely, and if it did,
+ // there's a pretty good chance that our assumptions about being able to do
+ // arithmetic on it would also be invalid.
+ int get _localeZero => symbols.ZERO_DIGIT.codeUnits.first;
/**
* Returns the prefix for [x] based on whether it's positive or negative.
« no previous file with comments | « pkg/intl/lib/bidi_utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698