| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 */ | 1014 */ |
| 1015 V8EXPORT int Length() const; | 1015 V8EXPORT int Length() const; |
| 1016 | 1016 |
| 1017 /** | 1017 /** |
| 1018 * Returns the number of bytes in the UTF-8 encoded | 1018 * Returns the number of bytes in the UTF-8 encoded |
| 1019 * representation of this string. | 1019 * representation of this string. |
| 1020 */ | 1020 */ |
| 1021 V8EXPORT int Utf8Length() const; | 1021 V8EXPORT int Utf8Length() const; |
| 1022 | 1022 |
| 1023 /** | 1023 /** |
| 1024 * A fast conservative check for non-ASCII characters. May |
| 1025 * return true even for ASCII strings, but if it returns |
| 1026 * false you can be sure that all characters are in the range |
| 1027 * 0-127. |
| 1028 */ |
| 1029 V8EXPORT bool MayContainNonAscii() const; |
| 1030 |
| 1031 /** |
| 1024 * Write the contents of the string to an external buffer. | 1032 * Write the contents of the string to an external buffer. |
| 1025 * If no arguments are given, expects the buffer to be large | 1033 * If no arguments are given, expects the buffer to be large |
| 1026 * enough to hold the entire string and NULL terminator. Copies | 1034 * enough to hold the entire string and NULL terminator. Copies |
| 1027 * the contents of the string and the NULL terminator into the | 1035 * the contents of the string and the NULL terminator into the |
| 1028 * buffer. | 1036 * buffer. |
| 1029 * | 1037 * |
| 1030 * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop | 1038 * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop |
| 1031 * before the end of the buffer. | 1039 * before the end of the buffer. |
| 1032 * | 1040 * |
| 1033 * Copies up to length characters into the output buffer. | 1041 * Copies up to length characters into the output buffer. |
| (...skipping 3269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4303 | 4311 |
| 4304 | 4312 |
| 4305 } // namespace v8 | 4313 } // namespace v8 |
| 4306 | 4314 |
| 4307 | 4315 |
| 4308 #undef V8EXPORT | 4316 #undef V8EXPORT |
| 4309 #undef TYPE_CHECK | 4317 #undef TYPE_CHECK |
| 4310 | 4318 |
| 4311 | 4319 |
| 4312 #endif // V8_H_ | 4320 #endif // V8_H_ |
| OLD | NEW |