| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 /** | 5 /** |
| 6 * The String class represents character strings. Strings are | 6 * The String class represents character strings. Strings are |
| 7 * immutable. A string is represented by a list of 32-bit Unicode | 7 * immutable. A string is represented by a list of 32-bit Unicode |
| 8 * scalar character codes accessible through the [charCodeAt] or the | 8 * scalar character codes accessible through the [charCodeAt] or the |
| 9 * [charCodes] method. | 9 * [charCodes] method. |
| 10 */ | 10 */ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 */ | 40 */ |
| 41 bool endsWith(String other); | 41 bool endsWith(String other); |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * Returns whether this string starts with [other]. | 44 * Returns whether this string starts with [other]. |
| 45 */ | 45 */ |
| 46 bool startsWith(String other); | 46 bool startsWith(String other); |
| 47 | 47 |
| 48 /** | 48 /** |
| 49 * Returns the first location of [other] in this string starting at | 49 * Returns the first location of [other] in this string starting at |
| 50 * [startIndex] (inclusive). | 50 * [start] (inclusive). |
| 51 * Returns -1 if [other] could not be found. | 51 * Returns -1 if [other] could not be found. |
| 52 */ | 52 */ |
| 53 int indexOf(String other, int startIndex); | 53 int indexOf(String other, [int start]); |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * Returns the last location of [other] in this string, searching | 56 * Returns the last location of [other] in this string, searching |
| 57 * backward starting at [fromIndex] (inclusive). | 57 * backward starting at [start] (inclusive). |
| 58 * Returns -1 if [other] could not be found. | 58 * Returns -1 if [other] could not be found. |
| 59 */ | 59 */ |
| 60 int lastIndexOf(String other, int fromIndex); | 60 int lastIndexOf(String other, [int start]); |
| 61 | 61 |
| 62 /** | 62 /** |
| 63 * Returns whether this string is empty. | 63 * Returns whether this string is empty. |
| 64 */ | 64 */ |
| 65 bool isEmpty(); | 65 bool isEmpty(); |
| 66 | 66 |
| 67 /** | 67 /** |
| 68 * Creates a new string by concatenating this string with [other]. | 68 * Creates a new string by concatenating this string with [other]. |
| 69 */ | 69 */ |
| 70 String concat(String other); | 70 String concat(String other); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 85 * Returns a new string where leading and trailing whitespaces of | 85 * Returns a new string where leading and trailing whitespaces of |
| 86 * this string have been removed, or returns this string if it does | 86 * this string have been removed, or returns this string if it does |
| 87 * not have leading and trailing whitespaces. | 87 * not have leading and trailing whitespaces. |
| 88 */ | 88 */ |
| 89 String trim(); | 89 String trim(); |
| 90 | 90 |
| 91 /** | 91 /** |
| 92 * Returns whether this string contains [other] starting | 92 * Returns whether this string contains [other] starting |
| 93 * at [startIndex] (inclusive). | 93 * at [startIndex] (inclusive). |
| 94 */ | 94 */ |
| 95 bool contains(Pattern other, int startIndex); | 95 bool contains(Pattern other, [int startIndex]); |
| 96 | 96 |
| 97 /** | 97 /** |
| 98 * Returns a new string where the first occurence of [from] in this string | 98 * Returns a new string where the first occurence of [from] in this string |
| 99 * is replaced with [to]. | 99 * is replaced with [to]. |
| 100 */ | 100 */ |
| 101 String replaceFirst(Pattern from, String to); | 101 String replaceFirst(Pattern from, String to); |
| 102 | 102 |
| 103 /** | 103 /** |
| 104 * Returns a new string where all occurences of [from] in this string | 104 * Returns a new string where all occurences of [from] in this string |
| 105 * are replaced with [to]. | 105 * are replaced with [to]. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 127 * where all characters are made lower case. Returns [:this:] otherwise. | 127 * where all characters are made lower case. Returns [:this:] otherwise. |
| 128 */ | 128 */ |
| 129 String toLowerCase(); | 129 String toLowerCase(); |
| 130 | 130 |
| 131 /** | 131 /** |
| 132 * If this string is not already all uper case, returns a new string | 132 * If this string is not already all uper case, returns a new string |
| 133 * where all characters are made upper case. Returns [:this:] otherwise. | 133 * where all characters are made upper case. Returns [:this:] otherwise. |
| 134 */ | 134 */ |
| 135 String toUpperCase(); | 135 String toUpperCase(); |
| 136 } | 136 } |
| OLD | NEW |