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

Side by Side Diff: lib/core/int.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/core/expect.dart ('k') | lib/coreimpl/coreimpl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Dart core library. 5 // Dart core library.
6 6
7 abstract class int implements num { 7 abstract class int implements num {
8 // Bit-operations. 8 // Bit-operations.
9 int operator &(int other); 9 int operator &(int other);
10 int operator |(int other); 10 int operator |(int other);
11 int operator ^(int other); 11 int operator ^(int other);
12 int operator ~(); 12 int operator ~();
13 int operator <<(int shiftAmount); 13 int operator <<(int shiftAmount);
14 int operator >>(int shiftAmount); 14 int operator >>(int shiftAmount);
15 15
16 // Testers. 16 // Testers.
17 bool isEven(); 17 bool isEven();
18 bool isOdd(); 18 bool isOdd();
19 19
20 // Specializations of super-interface. 20 // Specializations of super-interface.
21 int operator -(); 21 int operator -();
22 int abs(); 22 int abs();
23 int round(); 23 int round();
24 int floor(); 24 int floor();
25 int ceil(); 25 int ceil();
26 int truncate(); 26 int truncate();
27 /**
28 * Returns a representation of this [int] value.
29 *
30 * It should always be the case that if 'i' is an [int] value, then
31 * [:i == int.parse(i.toString())].
32 */
33 String toString();
34
35 /**
36 * Parse [source] as an integer literal and return its value.
37 *
38 * Accepts "0x" prefix for hexadecimal numbers, otherwise defaults
39 * to base-10.
40 * Throws a [FormatException] if [source] is not a valid integer literal.
41 */
42 external static int parse(String source);
27 } 43 }
OLDNEW
« no previous file with comments | « lib/core/expect.dart ('k') | lib/coreimpl/coreimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698