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 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1082 * A fast conservative check for non-ASCII characters. May | 1082 * A fast conservative check for non-ASCII characters. May |
1083 * return true even for ASCII strings, but if it returns | 1083 * return true even for ASCII strings, but if it returns |
1084 * false you can be sure that all characters are in the range | 1084 * false you can be sure that all characters are in the range |
1085 * 0-127. | 1085 * 0-127. |
1086 */ | 1086 */ |
1087 bool MayContainNonAscii() const; | 1087 bool MayContainNonAscii() const; |
1088 | 1088 |
1089 /** | 1089 /** |
1090 * Returns whether this string contains only one byte data. | 1090 * Returns whether this string contains only one byte data. |
1091 */ | 1091 */ |
1092 V8EXPORT bool IsOneByte() const; | 1092 bool IsOneByte() const; |
1093 | 1093 |
1094 /** | 1094 /** |
1095 * Write the contents of the string to an external buffer. | 1095 * Write the contents of the string to an external buffer. |
1096 * If no arguments are given, expects the buffer to be large | 1096 * If no arguments are given, expects the buffer to be large |
1097 * enough to hold the entire string and NULL terminator. Copies | 1097 * enough to hold the entire string and NULL terminator. Copies |
1098 * the contents of the string and the NULL terminator into the | 1098 * the contents of the string and the NULL terminator into the |
1099 * buffer. | 1099 * buffer. |
1100 * | 1100 * |
1101 * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop | 1101 * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop |
1102 * before the end of the buffer. | 1102 * before the end of the buffer. |
(...skipping 24 matching lines...) Expand all Loading... | |
1127 int Write(uint16_t* buffer, | 1127 int Write(uint16_t* buffer, |
1128 int start = 0, | 1128 int start = 0, |
1129 int length = -1, | 1129 int length = -1, |
1130 int options = NO_OPTIONS) const; | 1130 int options = NO_OPTIONS) const; |
1131 // ASCII characters. | 1131 // ASCII characters. |
1132 int WriteAscii(char* buffer, | 1132 int WriteAscii(char* buffer, |
1133 int start = 0, | 1133 int start = 0, |
1134 int length = -1, | 1134 int length = -1, |
1135 int options = NO_OPTIONS) const; | 1135 int options = NO_OPTIONS) const; |
1136 // One byte characters. | 1136 // One byte characters. |
1137 V8EXPORT int WriteOneByte(uint8_t* buffer, | 1137 int WriteOneByte(uint8_t* buffer, |
1138 int start = 0, | 1138 int start = 0, |
Michael Starzinger
2013/01/15 10:40:59
Nit of the day: Indentation is off.
| |
1139 int length = -1, | 1139 int length = -1, |
1140 int options = NO_OPTIONS) const; | 1140 int options = NO_OPTIONS) const; |
1141 // UTF-8 encoded characters. | 1141 // UTF-8 encoded characters. |
1142 int WriteUtf8(char* buffer, | 1142 int WriteUtf8(char* buffer, |
1143 int length = -1, | 1143 int length = -1, |
1144 int* nchars_ref = NULL, | 1144 int* nchars_ref = NULL, |
1145 int options = NO_OPTIONS) const; | 1145 int options = NO_OPTIONS) const; |
1146 | 1146 |
1147 /** | 1147 /** |
1148 * A zero length string. | 1148 * A zero length string. |
(...skipping 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4805 | 4805 |
4806 | 4806 |
4807 } // namespace v8 | 4807 } // namespace v8 |
4808 | 4808 |
4809 | 4809 |
4810 #undef V8EXPORT | 4810 #undef V8EXPORT |
4811 #undef TYPE_CHECK | 4811 #undef TYPE_CHECK |
4812 | 4812 |
4813 | 4813 |
4814 #endif // V8_H_ | 4814 #endif // V8_H_ |
OLD | NEW |