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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 * Returns -1 if [other] could not be found. | 122 * Returns -1 if [other] could not be found. |
123 */ | 123 */ |
124 int lastIndexOf(String other, [int start]); | 124 int lastIndexOf(String other, [int start]); |
125 | 125 |
126 /** | 126 /** |
127 * Returns whether this string is empty. | 127 * Returns whether this string is empty. |
128 */ | 128 */ |
129 bool get isEmpty; | 129 bool get isEmpty; |
130 | 130 |
131 /** | 131 /** |
| 132 * Returns whether this string is not empty. |
| 133 */ |
| 134 bool get isNotEmpty; |
| 135 |
| 136 /** |
132 * Creates a new string by concatenating this string with [other]. | 137 * Creates a new string by concatenating this string with [other]. |
133 * | 138 * |
134 * A sequence of strings can be concatenated by using [Iterable.join]: | 139 * A sequence of strings can be concatenated by using [Iterable.join]: |
135 * | 140 * |
136 * var strings = ['foo', 'bar', 'geez']; | 141 * var strings = ['foo', 'bar', 'geez']; |
137 * var concatenated = strings.join(); | 142 * var concatenated = strings.join(); |
138 */ | 143 */ |
139 String operator +(String other); | 144 String operator +(String other); |
140 | 145 |
141 /** | 146 /** |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 _position = position - 1; | 462 _position = position - 1; |
458 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); | 463 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); |
459 return true; | 464 return true; |
460 } | 465 } |
461 } | 466 } |
462 _position = position; | 467 _position = position; |
463 _currentCodePoint = codeUnit; | 468 _currentCodePoint = codeUnit; |
464 return true; | 469 return true; |
465 } | 470 } |
466 } | 471 } |
OLD | NEW |