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