Lines Matching refs:search
210 function StringReplace(search, replace) {
216 // .. regexp search
218 // ...... non-global search
221 // ...... global search
225 // ...... global search
226 // ...... non-global search
227 // .. string search
232 if (IS_REGEXP(search)) {
236 if (!REGEXP_GLOBAL(search)) {
237 // Non-global regexp search, string replace.
238 var match = RegExpExec(search, subject, 0);
240 search.lastIndex = 0
252 // Global regexp search, string replace.
253 search.lastIndex = 0;
255 subject, search, replace, RegExpLastMatchInfo);
258 if (REGEXP_GLOBAL(search)) {
259 // Global regexp search, function replace.
260 return StringReplaceGlobalRegExpWithFunction(subject, search, replace);
262 // Non-global regexp search, function replace.
263 return StringReplaceNonGlobalRegExpWithFunction(subject, search, replace);
266 search = TO_STRING(search);
268 if (search.length == 1 &&
275 return %StringReplaceOneCharWithString(subject, search, replace);
277 var start = %StringIndexOf(subject, search, 0);
279 var end = start + search.length;
285 result += replace(search, start, subject);
508 CHECK_OBJECT_COERCIBLE(this, "String.prototype.search");
1068 "search", StringSearch,