Lines Matching refs:search
194 function StringReplace(search, replace) {
200 // .. regexp search
202 // ...... non-global search
205 // ...... global search
209 // ...... global search
210 // ...... non-global search
211 // .. string search
216 if (IS_REGEXP(search)) {
219 var lastIndex = search.lastIndex;
225 if (!search.global) {
226 // Non-global regexp search, string replace.
227 var match = DoRegExpExec(search, subject, 0);
229 search.lastIndex = 0
241 // Global regexp search, string replace.
242 search.lastIndex = 0;
245 subject, search, replace, lastMatchInfo);
253 subject, search, replace, lastMatchInfo);
263 if (search.global) {
264 // Global regexp search, function replace.
265 return StringReplaceGlobalRegExpWithFunction(subject, search, replace);
267 // Non-global regexp search, function replace.
268 return StringReplaceNonGlobalRegExpWithFunction(subject, search, replace);
271 search = TO_STRING_INLINE(search);
273 if (search.length == 1 &&
280 return %StringReplaceOneCharWithString(subject, search, replace);
282 var start = %StringIndexOf(subject, search, 0);
284 var end = start + search.length;
291 result += %_CallFunction(receiver, search, start, subject, replace);
525 CHECK_OBJECT_COERCIBLE(this, "String.prototype.search");
957 "search", StringSearch,