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

Unified Diff: include/v8.h

Issue 1539013: Change String::WriteUtf8() to return characters written. (Closed)
Patch Set: Fix style issues Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index f64b3867367ab1f65729b04c4b6666c1a385fc1c..90c43831f4165505a8a92c8916a34d255ebabc16 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -855,12 +855,15 @@ class V8EXPORT String : public Primitive {
* \param start The starting position within the string at which
* copying begins.
* \param length The number of bytes to copy from the string.
- * \return The number of characters copied to the buffer
+ * \param nchars The number of characters written.
+ * \return The number of bytes copied to the buffer
* excluding the NULL terminator.
*/
int Write(uint16_t* buffer, int start = 0, int length = -1) const; // UTF-16
int WriteAscii(char* buffer, int start = 0, int length = -1) const; // ASCII
- int WriteUtf8(char* buffer, int length = -1) const; // UTF-8
+ int WriteUtf8(char* buffer,
+ int length = -1,
+ int* nchars = NULL) const; // UTF-8
/**
* A zero length string.
« 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