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

Side by Side Diff: include/v8.h

Issue 121173009: String:WriteUtf8: Add REPLACE_INVALID_UTF8 option (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Abandon refactoring, get core behavior change done Created 6 years, 11 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
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 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 * \param options Various options that might affect performance of this or 1639 * \param options Various options that might affect performance of this or
1640 * subsequent operations. 1640 * subsequent operations.
1641 * \return The number of characters copied to the buffer excluding the null 1641 * \return The number of characters copied to the buffer excluding the null
1642 * terminator. For WriteUtf8: The number of bytes copied to the buffer 1642 * terminator. For WriteUtf8: The number of bytes copied to the buffer
1643 * including the null terminator (if written). 1643 * including the null terminator (if written).
1644 */ 1644 */
1645 enum WriteOptions { 1645 enum WriteOptions {
1646 NO_OPTIONS = 0, 1646 NO_OPTIONS = 0,
1647 HINT_MANY_WRITES_EXPECTED = 1, 1647 HINT_MANY_WRITES_EXPECTED = 1,
1648 NO_NULL_TERMINATION = 2, 1648 NO_NULL_TERMINATION = 2,
1649 PRESERVE_ASCII_NULL = 4 1649 PRESERVE_ASCII_NULL = 4,
1650 DISALLOW_INVALID_UTF8 = 8
dcarney 2014/01/10 16:49:55 this needs a comment above
haimuiba 2014/01/13 07:48:21 Done.
1650 }; 1651 };
1651 1652
1652 // 16-bit character codes. 1653 // 16-bit character codes.
1653 int Write(uint16_t* buffer, 1654 int Write(uint16_t* buffer,
1654 int start = 0, 1655 int start = 0,
1655 int length = -1, 1656 int length = -1,
1656 int options = NO_OPTIONS) const; 1657 int options = NO_OPTIONS) const;
1657 // One byte characters. 1658 // One byte characters.
1658 int WriteOneByte(uint8_t* buffer, 1659 int WriteOneByte(uint8_t* buffer,
1659 int start = 0, 1660 int start = 0,
(...skipping 4776 matching lines...) Expand 10 before | Expand all | Expand 10 after
6436 */ 6437 */
6437 6438
6438 6439
6439 } // namespace v8 6440 } // namespace v8
6440 6441
6441 6442
6442 #undef TYPE_CHECK 6443 #undef TYPE_CHECK
6443 6444
6444 6445
6445 #endif // V8_H_ 6446 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698