| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 * 2029 ; White_Space # Zp PARAGRAPH SEPARATOR | 172 * 2029 ; White_Space # Zp PARAGRAPH SEPARATOR |
| 173 * 202F ; White_Space # Zs NARROW NO-BREAK SPACE | 173 * 202F ; White_Space # Zs NARROW NO-BREAK SPACE |
| 174 * 205F ; White_Space # Zs MEDIUM MATHEMATICAL SPACE | 174 * 205F ; White_Space # Zs MEDIUM MATHEMATICAL SPACE |
| 175 * 3000 ; White_Space # Zs IDEOGRAPHIC SPACE | 175 * 3000 ; White_Space # Zs IDEOGRAPHIC SPACE |
| 176 * | 176 * |
| 177 * FEFF ; BOM ZERO WIDTH NO_BREAK SPACE | 177 * FEFF ; BOM ZERO WIDTH NO_BREAK SPACE |
| 178 */ | 178 */ |
| 179 String trim(); | 179 String trim(); |
| 180 | 180 |
| 181 /** | 181 /** |
| 182 * Returns whether this string contains [other] starting | 182 * Returns whether this string contains a match of [other]. |
| 183 * at [startIndex] (inclusive). | 183 * |
| 184 * If [startIndex] is provided, only matches at or after that index |
| 185 * are considered. |
| 186 * |
| 187 * It is an error if [startIndex] is negative or greater than [length]. |
| 184 */ | 188 */ |
| 185 bool contains(Pattern other, [int startIndex]); | 189 bool contains(Pattern other, [int startIndex = 0]); |
| 186 | 190 |
| 187 /** | 191 /** |
| 188 * Returns a new string where the first occurence of [from] in this string | 192 * Returns a new string where the first occurence of [from] in this string |
| 189 * is replaced with [to]. | 193 * is replaced with [to]. |
| 190 */ | 194 */ |
| 191 String replaceFirst(Pattern from, String to); | 195 String replaceFirst(Pattern from, String to); |
| 192 | 196 |
| 193 /** | 197 /** |
| 194 * Returns a new string where all occurences of [from] in this string | 198 * Returns a new string where all occurences of [from] in this string |
| 195 * are replaced with [replace]. | 199 * are replaced with [replace]. |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 _position = position - 1; | 466 _position = position - 1; |
| 463 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); | 467 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); |
| 464 return true; | 468 return true; |
| 465 } | 469 } |
| 466 } | 470 } |
| 467 _position = position; | 471 _position = position; |
| 468 _currentCodePoint = codeUnit; | 472 _currentCodePoint = codeUnit; |
| 469 return true; | 473 return true; |
| 470 } | 474 } |
| 471 } | 475 } |
| OLD | NEW |