| OLD | NEW |
| 1 // Copyright (c) 2011, 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 /** | 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 */ |
| 11 interface String | 11 interface String |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 */ | 71 */ |
| 72 String concat(String other); | 72 String concat(String other); |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * Returns a substring of this string in the given range. | 75 * Returns a substring of this string in the given range. |
| 76 * [startIndex] is inclusive and [endIndex] is exclusive. | 76 * [startIndex] is inclusive and [endIndex] is exclusive. |
| 77 */ | 77 */ |
| 78 String substring(int startIndex, [int endIndex]); | 78 String substring(int startIndex, [int endIndex]); |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * Returns a new string where leading and trailing whitespaces of | 81 * Removes leading and trailing whitespace from a string. If the |
| 82 * this string have been removed, or returns this string if it does | 82 * string contains leading or trailing whitespace a new string with |
| 83 * not have leading and trailing whitespaces. | 83 * no leading and no trailing whitespace is returned. Otherwise, the |
| 84 * string itself is returned. |
| 84 */ | 85 */ |
| 85 String trim(); | 86 String trim(); |
| 86 | 87 |
| 87 /** | 88 /** |
| 88 * Returns whether this string contains [other] starting | 89 * Returns whether this string contains [other] starting |
| 89 * at [startIndex] (inclusive). | 90 * at [startIndex] (inclusive). |
| 90 */ | 91 */ |
| 91 bool contains(Pattern other, [int startIndex]); | 92 bool contains(Pattern other, [int startIndex]); |
| 92 | 93 |
| 93 /** | 94 /** |
| (...skipping 29 matching lines...) Expand all Loading... |
| 123 * where all characters are made lower case. Returns [:this:] otherwise. | 124 * where all characters are made lower case. Returns [:this:] otherwise. |
| 124 */ | 125 */ |
| 125 String toLowerCase(); | 126 String toLowerCase(); |
| 126 | 127 |
| 127 /** | 128 /** |
| 128 * If this string is not already all uper case, returns a new string | 129 * If this string is not already all uper case, returns a new string |
| 129 * where all characters are made upper case. Returns [:this:] otherwise. | 130 * where all characters are made upper case. Returns [:this:] otherwise. |
| 130 */ | 131 */ |
| 131 String toUpperCase(); | 132 String toUpperCase(); |
| 132 } | 133 } |
| OLD | NEW |