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 /** | 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 */ | 69 */ |
70 String concat(String other); | 70 String concat(String other); |
71 | 71 |
72 /** | 72 /** |
73 * Returns a substring of this string in the given range. | 73 * Returns a substring of this string in the given range. |
74 * [startIndex] is inclusive and [endIndex] is exclusive. | 74 * [startIndex] is inclusive and [endIndex] is exclusive. |
75 */ | 75 */ |
76 String substring(int startIndex, [int endIndex]); | 76 String substring(int startIndex, [int endIndex]); |
77 | 77 |
78 /** | 78 /** |
79 * Removes leading and trailing whitespace from a string. If the | 79 * Removes leading and trailing whitespace from a string. If the string |
80 * string contains leading or trailing whitespace a new string with | 80 * contains leading or trailing whitespace a new string with no leading and |
81 * no leading and no trailing whitespace is returned. Otherwise, the | 81 * no trailing whitespace is returned. Otherwise, the string itself is |
82 * string itself is returned. | 82 * returned. Whitespace is defined as every Unicode character in the Zs, Zl |
| 83 * and Zp categories (this includes no-break space), the spacing control |
| 84 * characters from 9 to 13 (tab, lf, vtab, ff and cr), and 0xfeff the BOM |
| 85 * character. |
83 */ | 86 */ |
84 String trim(); | 87 String trim(); |
85 | 88 |
86 /** | 89 /** |
87 * Returns whether this string contains [other] starting | 90 * Returns whether this string contains [other] starting |
88 * at [startIndex] (inclusive). | 91 * at [startIndex] (inclusive). |
89 */ | 92 */ |
90 bool contains(Pattern other, [int startIndex]); | 93 bool contains(Pattern other, [int startIndex]); |
91 | 94 |
92 /** | 95 /** |
(...skipping 29 matching lines...) Expand all Loading... |
122 * where all characters are made lower case. Returns [:this:] otherwise. | 125 * where all characters are made lower case. Returns [:this:] otherwise. |
123 */ | 126 */ |
124 String toLowerCase(); | 127 String toLowerCase(); |
125 | 128 |
126 /** | 129 /** |
127 * If this string is not already all uper case, returns a new string | 130 * If this string is not already all uper case, returns a new string |
128 * where all characters are made upper case. Returns [:this:] otherwise. | 131 * where all characters are made upper case. Returns [:this:] otherwise. |
129 */ | 132 */ |
130 String toUpperCase(); | 133 String toUpperCase(); |
131 } | 134 } |
OLD | NEW |