Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: include/v8.h

Issue 10810056: Improve String::WriteAscii and add PRESERVE_ASCII_NULL option. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 * \param nchars_ref The number of characters written, can be NULL. 1057 * \param nchars_ref The number of characters written, can be NULL.
1058 * \param options Various options that might affect performance of this or 1058 * \param options Various options that might affect performance of this or
1059 * subsequent operations. 1059 * subsequent operations.
1060 * \return The number of characters copied to the buffer excluding the null 1060 * \return The number of characters copied to the buffer excluding the null
1061 * terminator. For WriteUtf8: The number of bytes copied to the buffer 1061 * terminator. For WriteUtf8: The number of bytes copied to the buffer
1062 * including the null terminator (if written). 1062 * including the null terminator (if written).
1063 */ 1063 */
1064 enum WriteOptions { 1064 enum WriteOptions {
1065 NO_OPTIONS = 0, 1065 NO_OPTIONS = 0,
1066 HINT_MANY_WRITES_EXPECTED = 1, 1066 HINT_MANY_WRITES_EXPECTED = 1,
1067 NO_NULL_TERMINATION = 2 1067 NO_NULL_TERMINATION = 2,
1068 PRESERVE_ASCII_NULL = 4
1068 }; 1069 };
1069 1070
1070 // 16-bit character codes. 1071 // 16-bit character codes.
1071 V8EXPORT int Write(uint16_t* buffer, 1072 V8EXPORT int Write(uint16_t* buffer,
1072 int start = 0, 1073 int start = 0,
1073 int length = -1, 1074 int length = -1,
1074 int options = NO_OPTIONS) const; 1075 int options = NO_OPTIONS) const;
1075 // ASCII characters. 1076 // ASCII characters.
1076 V8EXPORT int WriteAscii(char* buffer, 1077 V8EXPORT int WriteAscii(char* buffer,
1077 int start = 0, 1078 int start = 0,
(...skipping 3456 matching lines...) Expand 10 before | Expand all | Expand 10 after
4534 4535
4535 4536
4536 } // namespace v8 4537 } // namespace v8
4537 4538
4538 4539
4539 #undef V8EXPORT 4540 #undef V8EXPORT
4540 #undef TYPE_CHECK 4541 #undef TYPE_CHECK
4541 4542
4542 4543
4543 #endif // V8_H_ 4544 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698