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

Unified Diff: src/objects.h

Issue 2176553002: Move StringMatch to String::IndexOf (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 82155dafc2820a8d5f9827f1351ebf4de998f727..2a202c878c186b3d88234056ad4e897d03727125 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -9027,6 +9027,12 @@ class String: public Name {
MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x,
Handle<String> y);
+ // Perform string match of pattern on subject, starting at start index.
+ // Caller must ensure that 0 <= start_index <= sub->length(),
+ // and should check that pat->length() + start_index <= sub->length().
Yang 2016/07/22 08:34:03 looks like this second requirement is not necessar
jgruber 2016/07/22 09:22:30 Done.
+ static int IndexOf(Isolate* isolate, Handle<String> sub, Handle<String> pat,
+ int start_index);
+
// String equality operations.
inline bool Equals(String* other);
inline static bool Equals(Handle<String> one, Handle<String> two);
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698