Lines Matching refs:subject
19 // Perform string match of pattern on subject, starting at start index.
63 Isolate* isolate, Handle<String> subject, Handle<String> search,
70 if (subject->IsConsString()) {
71 ConsString* cons = ConsString::cast(*subject);
89 return subject;
91 int index = StringMatch(isolate, subject, search, 0);
92 if (index == -1) return subject;
94 Handle<String> first = isolate->factory()->NewSubString(subject, 0, index);
100 isolate->factory()->NewSubString(subject, index + 1, subject->length());
109 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
114 // retry with a flattened subject string.
118 if (StringReplaceOneCharWithString(isolate, subject, search, replace, &found,
124 subject = String::Flatten(subject);
125 if (StringReplaceOneCharWithString(isolate, subject, search, replace, &found,
153 static int StringMatchBackwards(Vector<const schar> subject,
157 DCHECK(idx + pattern_length <= subject.length());
170 if (subject[i] != pattern_first_char) continue;
173 if (pattern[j] != subject[i + j]) {
338 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
344 RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate);
366 RegExpImpl::SetLastMatchInfo(regexp_info, subject, capture_count,
372 isolate->factory()->NewSubString(subject, offsets.at(0), offsets.at(1));
379 isolate->factory()->NewProperSubString(subject, from, to);
392 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
398 subject = String::Flatten(subject);
400 if (i >= static_cast<uint32_t>(subject->length())) {
404 return Smi::FromInt(subject->Get(i));