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

Unified Diff: lib/math/base.dart

Issue 10913271: Move parseInt parseDouble to int/double classes as a static method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make int.parse directly native. 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
« no previous file with comments | « lib/json/json.dart ('k') | lib/uri/encode_decode.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/math/base.dart
diff --git a/lib/math/base.dart b/lib/math/base.dart
index 1dac83d66a0c9e28f89e6be553157f28e184f0af..b4b93d1e160e983400db76a61ec7c7c8a73691b5 100644
--- a/lib/math/base.dart
+++ b/lib/math/base.dart
@@ -46,19 +46,11 @@ const double SQRT1_2 = 0.7071067811865476;
*/
const double SQRT2 = 1.4142135623730951;
-/**
- * Parses a [String] representation of an [int], and returns an [int].
- *
- * Throws a [FormatException] if [str] cannot be parsed as an [int].
- */
-external int parseInt(String str);
+/** Temporary redirect to [int.parse]. */
+int parseInt(String string) => int.parse(string);
-/**
- * Parses a [String] representation of a [double], and returns a [double].
- *
- * Throws a [FormatException] if [str] cannot be parsed as a [double].
- */
-external double parseDouble(String str);
+/** Temporary redirect to [double.parse]. */
+double parseDouble(String string) => double.parse(string);
/**
* Returns the lesser of two numbers.
« no previous file with comments | « lib/json/json.dart ('k') | lib/uri/encode_decode.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698