OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1176 */ | 1176 */ |
1177 int Length() const; | 1177 int Length() const; |
1178 | 1178 |
1179 /** | 1179 /** |
1180 * Returns the number of bytes in the UTF-8 encoded | 1180 * Returns the number of bytes in the UTF-8 encoded |
1181 * representation of this string. | 1181 * representation of this string. |
1182 */ | 1182 */ |
1183 int Utf8Length() const; | 1183 int Utf8Length() const; |
1184 | 1184 |
1185 /** | 1185 /** |
1186 * A fast conservative check for non-ASCII characters. May | 1186 * This function is no longer useful. |
1187 * return true even for ASCII strings, but if it returns | |
1188 * false you can be sure that all characters are in the range | |
1189 * 0-127. | |
1190 */ | 1187 */ |
1191 bool MayContainNonAscii() const; | 1188 // TODO(dcarney): deprecate |
tfarina
2013/04/26 16:31:52
can we use V8_DEPRECATED?
| |
1189 V8_INLINE(bool MayContainNonAscii()) const { return true; } | |
1192 | 1190 |
1193 /** | 1191 /** |
1194 * Returns whether this string contains only one byte data. | 1192 * Returns whether this string contains only one byte data. |
1195 */ | 1193 */ |
1196 bool IsOneByte() const; | 1194 bool IsOneByte() const; |
1197 | 1195 |
1198 /** | 1196 /** |
1199 * Write the contents of the string to an external buffer. | 1197 * Write the contents of the string to an external buffer. |
1200 * If no arguments are given, expects the buffer to be large | 1198 * If no arguments are given, expects the buffer to be large |
1201 * enough to hold the entire string and NULL terminator. Copies | 1199 * enough to hold the entire string and NULL terminator. Copies |
(...skipping 4143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5345 | 5343 |
5346 | 5344 |
5347 } // namespace v8 | 5345 } // namespace v8 |
5348 | 5346 |
5349 | 5347 |
5350 #undef V8EXPORT | 5348 #undef V8EXPORT |
5351 #undef TYPE_CHECK | 5349 #undef TYPE_CHECK |
5352 | 5350 |
5353 | 5351 |
5354 #endif // V8_H_ | 5352 #endif // V8_H_ |
OLD | NEW |