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

Unified Diff: include/v8.h

Issue 16530003: add function to test whether string contents are definitely one byte (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 6 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') | src/objects.cc » ('J')
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 28a63f092efb5a7831ccd5a891a9cffddbf4f655..a8221078030fa64c5ebe859d4ebe106daa8a4688 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1524,11 +1524,19 @@ class V8EXPORT String : public Primitive {
V8_DEPRECATED(V8_INLINE(bool MayContainNonAscii()) const) { return true; }
/**
- * Returns whether this string contains only one byte data.
+ * Returns whether this string is known to contain only one byte data.
+ * Does not read the string.
+ * False negatives are possible.
*/
bool IsOneByte() const;
/**
+ * Returns whether this string contain only one byte data.
+ * Will read the entire string in some cases.
+ */
+ bool ContainsOnlyOneByte() const;
+
+ /**
* Write the contents of the string to an external buffer.
* If no arguments are given, expects the buffer to be large
* enough to hold the entire string and NULL terminator. Copies
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698