| OLD | NEW |
| 1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 * copying begins. | 856 * copying begins. |
| 857 * \param length The number of bytes to copy from the string. | 857 * \param length The number of bytes to copy from the string. |
| 858 * \return The number of characters copied to the buffer | 858 * \return The number of characters copied to the buffer |
| 859 * excluding the NULL terminator. | 859 * excluding the NULL terminator. |
| 860 */ | 860 */ |
| 861 int Write(uint16_t* buffer, int start = 0, int length = -1) const; // UTF-16 | 861 int Write(uint16_t* buffer, int start = 0, int length = -1) const; // UTF-16 |
| 862 int WriteAscii(char* buffer, int start = 0, int length = -1) const; // ASCII | 862 int WriteAscii(char* buffer, int start = 0, int length = -1) const; // ASCII |
| 863 int WriteUtf8(char* buffer, int length = -1) const; // UTF-8 | 863 int WriteUtf8(char* buffer, int length = -1) const; // UTF-8 |
| 864 | 864 |
| 865 /** | 865 /** |
| 866 * Flatten internal memory. Operations on the string tend to run faster |
| 867 * after flattening especially if the string is a concatenation of many |
| 868 * others. |
| 869 */ |
| 870 void Flatten(); |
| 871 |
| 872 /** |
| 866 * A zero length string. | 873 * A zero length string. |
| 867 */ | 874 */ |
| 868 static v8::Local<v8::String> Empty(); | 875 static v8::Local<v8::String> Empty(); |
| 869 | 876 |
| 870 /** | 877 /** |
| 871 * Returns true if the string is external | 878 * Returns true if the string is external |
| 872 */ | 879 */ |
| 873 bool IsExternal() const; | 880 bool IsExternal() const; |
| 874 | 881 |
| 875 /** | 882 /** |
| (...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3389 | 3396 |
| 3390 } // namespace v8 | 3397 } // namespace v8 |
| 3391 | 3398 |
| 3392 | 3399 |
| 3393 #undef V8EXPORT | 3400 #undef V8EXPORT |
| 3394 #undef V8EXPORT_INLINE | 3401 #undef V8EXPORT_INLINE |
| 3395 #undef TYPE_CHECK | 3402 #undef TYPE_CHECK |
| 3396 | 3403 |
| 3397 | 3404 |
| 3398 #endif // V8_H_ | 3405 #endif // V8_H_ |
| OLD | NEW |