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

Unified Diff: runtime/vm/object.h

Issue 11418095: Use the code point iterator in equality comparisons to C strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add comments Created 8 years, 1 month 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 | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index d2914dcf2c17103b4a7174d71655eddb148dcfe0..cee8d823bc4c8dea06c803c11a78721b43d13c32 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -3761,9 +3761,17 @@ class String : public Instance {
inline bool Equals(const String& str,
intptr_t begin_index, // begin index on 'str'.
intptr_t len) const; // len on 'str'.
- bool Equals(const char* str) const;
+
+ // Compares to a '\0' terminated array of UTF-8 encoded characters.
+ bool Equals(const char* cstr) const;
+
+ // Compares to an array of UTF-8 encoded characters.
bool Equals(const uint8_t* characters, intptr_t len) const;
+
+ // Compares to an array of UTF-16 encoded characters.
bool Equals(const uint16_t* characters, intptr_t len) const;
+
+ // Compares to an array of UTF-32 encoded characters.
bool Equals(const uint32_t* characters, intptr_t len) const;
virtual bool Equals(const Instance& other) const;
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698