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

Side by Side Diff: pkg/intl/lib/number_format.dart

Issue 26681002: Add EfficientLength marker interface to some iterabels. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of intl; 5 part of intl;
6 /** 6 /**
7 * Provides the ability to format a number in a locale-specific way. The 7 * Provides the ability to format a number in a locale-specific way. The
8 * format is specified as a pattern using a subset of the ICU formatting 8 * format is specified as a pattern using a subset of the ICU formatting
9 * patterns. 9 * patterns.
10 * 10 *
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 class _StringIterator implements Iterator<String> { 713 class _StringIterator implements Iterator<String> {
714 String input; 714 String input;
715 var index = -1; 715 var index = -1;
716 inBounds(i) => i >= 0 && i < input.length; 716 inBounds(i) => i >= 0 && i < input.length;
717 _StringIterator(this.input); 717 _StringIterator(this.input);
718 String get current => inBounds(index) ? input[index] : null; 718 String get current => inBounds(index) ? input[index] : null;
719 719
720 bool moveNext() => inBounds(++index); 720 bool moveNext() => inBounds(++index);
721 String get peek => inBounds(index + 1) ? input[index + 1] : null; 721 String get peek => inBounds(index + 1) ? input[index + 1] : null;
722 Iterator<String> get iterator => this; 722 Iterator<String> get iterator => this;
723 } 723 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698