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 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 * representation of this string. | 1517 * representation of this string. |
1518 */ | 1518 */ |
1519 int Utf8Length() const; | 1519 int Utf8Length() const; |
1520 | 1520 |
1521 /** | 1521 /** |
1522 * This function is no longer useful. | 1522 * This function is no longer useful. |
1523 */ | 1523 */ |
1524 V8_DEPRECATED(V8_INLINE(bool MayContainNonAscii()) const) { return true; } | 1524 V8_DEPRECATED(V8_INLINE(bool MayContainNonAscii()) const) { return true; } |
1525 | 1525 |
1526 /** | 1526 /** |
1527 * Returns whether this string contains only one byte data. | 1527 * Returns whether this string is known to contain only one byte data. |
| 1528 * Does not read the string. |
| 1529 * False negatives are possible. |
1528 */ | 1530 */ |
1529 bool IsOneByte() const; | 1531 bool IsOneByte() const; |
1530 | 1532 |
1531 /** | 1533 /** |
| 1534 * Returns whether this string contain only one byte data. |
| 1535 * Will read the entire string in some cases. |
| 1536 */ |
| 1537 bool ContainsOnlyOneByte() const; |
| 1538 |
| 1539 /** |
1532 * Write the contents of the string to an external buffer. | 1540 * Write the contents of the string to an external buffer. |
1533 * If no arguments are given, expects the buffer to be large | 1541 * If no arguments are given, expects the buffer to be large |
1534 * enough to hold the entire string and NULL terminator. Copies | 1542 * enough to hold the entire string and NULL terminator. Copies |
1535 * the contents of the string and the NULL terminator into the | 1543 * the contents of the string and the NULL terminator into the |
1536 * buffer. | 1544 * buffer. |
1537 * | 1545 * |
1538 * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop | 1546 * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop |
1539 * before the end of the buffer. | 1547 * before the end of the buffer. |
1540 * | 1548 * |
1541 * Copies up to length characters into the output buffer. | 1549 * Copies up to length characters into the output buffer. |
(...skipping 4734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6276 | 6284 |
6277 | 6285 |
6278 } // namespace v8 | 6286 } // namespace v8 |
6279 | 6287 |
6280 | 6288 |
6281 #undef V8EXPORT | 6289 #undef V8EXPORT |
6282 #undef TYPE_CHECK | 6290 #undef TYPE_CHECK |
6283 | 6291 |
6284 | 6292 |
6285 #endif // V8_H_ | 6293 #endif // V8_H_ |
OLD | NEW |