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

Side by Side Diff: sdk/lib/core/string.dart

Issue 15333006: Rewrite double.parse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add parenthesis. Created 7 years, 7 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 dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * The String class represents sequences of characters. Strings are 8 * The String class represents sequences of characters. Strings are
9 * immutable. A string is represented by a sequence of Unicode UTF-16 9 * immutable. A string is represented by a sequence of Unicode UTF-16
10 * code units accessible through the [codeUnitAt] or the 10 * code units accessible through the [codeUnitAt] or the
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 */ 138 */
139 String operator +(String other); 139 String operator +(String other);
140 140
141 /** 141 /**
142 * Returns a substring of this string in the given range. 142 * Returns a substring of this string in the given range.
143 * [startIndex] is inclusive and [endIndex] is exclusive. 143 * [startIndex] is inclusive and [endIndex] is exclusive.
144 */ 144 */
145 String substring(int startIndex, [int endIndex]); 145 String substring(int startIndex, [int endIndex]);
146 146
147 /** 147 /**
148 * Removes leading and trailing whitespace from a string. If the string 148 * Removes leading and trailing whitespace from a string.
149 * contains leading or trailing whitespace a new string with no leading and 149 *
150 * no trailing whitespace is returned. Otherwise, the string itself is 150 * If the string contains leading or trailing whitespace a new string with no
151 * returned. Whitespace is defined as every Unicode character in the Zs, Zl 151 * leading and no trailing whitespace is returned. Otherwise, the string
152 * and Zp categories (this includes no-break space), the spacing control 152 * itself is returned.
153 * characters from 9 to 13 (tab, lf, vtab, ff and cr), and 0xfeff the BOM 153 *
154 * character. 154 * Whitespace is defined as every Unicode character in the Zs category (which
155 * contains space and no-break space), Zl and Zp categories, the spacing
156 * control characters from 9 to 13 (tab, line feed, vtab, form feed and
157 * return), and 0xfeff, the BOM character.
155 */ 158 */
156 String trim(); 159 String trim();
157 160
158 /** 161 /**
159 * Returns whether this string contains [other] starting 162 * Returns whether this string contains [other] starting
160 * at [startIndex] (inclusive). 163 * at [startIndex] (inclusive).
161 */ 164 */
162 bool contains(Pattern other, [int startIndex]); 165 bool contains(Pattern other, [int startIndex]);
163 166
164 /** 167 /**
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 _position = position - 1; 442 _position = position - 1;
440 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); 443 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit);
441 return true; 444 return true;
442 } 445 }
443 } 446 }
444 _position = position; 447 _position = position;
445 _currentCodePoint = codeUnit; 448 _currentCodePoint = codeUnit;
446 return true; 449 return true;
447 } 450 }
448 } 451 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698