OLD | NEW |
---|---|
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 Loading... | |
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 * | |
150 * If the string | |
Ivan Posva
2013/05/18 00:45:43
Strange wrap around.
floitsch
2013/05/20 13:15:29
wanted to keep the diff small.
done.
| |
149 * contains leading or trailing whitespace a new string with no leading and | 151 * contains leading or trailing whitespace a new string with no leading and |
150 * no trailing whitespace is returned. Otherwise, the string itself is | 152 * no trailing whitespace is returned. Otherwise, the string itself is |
151 * returned. Whitespace is defined as every Unicode character in the Zs, Zl | 153 * returned. |
154 * | |
155 * Whitespace is defined as every Unicode character in the Zs, Zl | |
152 * and Zp categories (this includes no-break space), the spacing control | 156 * and Zp categories (this includes no-break space), the spacing control |
153 * characters from 9 to 13 (tab, lf, vtab, ff and cr), and 0xfeff the BOM | 157 * characters from 9 to 13 (tab, lf, vtab, ff and cr), and 0xfeff the BOM |
Ivan Posva
2013/05/18 00:45:43
Funnily enough "space" is not mentioned in the lis
floitsch
2013/05/20 13:15:29
Yes. It's the first one in the Zs category.
I upda
| |
154 * character. | 158 * character. |
155 */ | 159 */ |
156 String trim(); | 160 String trim(); |
157 | 161 |
158 /** | 162 /** |
159 * Returns whether this string contains [other] starting | 163 * Returns whether this string contains [other] starting |
160 * at [startIndex] (inclusive). | 164 * at [startIndex] (inclusive). |
161 */ | 165 */ |
162 bool contains(Pattern other, [int startIndex]); | 166 bool contains(Pattern other, [int startIndex]); |
163 | 167 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 _position = position - 1; | 443 _position = position - 1; |
440 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); | 444 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); |
441 return true; | 445 return true; |
442 } | 446 } |
443 } | 447 } |
444 _position = position; | 448 _position = position; |
445 _currentCodePoint = codeUnit; | 449 _currentCodePoint = codeUnit; |
446 return true; | 450 return true; |
447 } | 451 } |
448 } | 452 } |
OLD | NEW |