Home | History | Annotate | Download | only in src

Lines Matching refs:search

213 function StringReplace(search, replace) {
221 // .. regexp search
223 // ...... non-global search
226 // ...... global search
230 // ...... global search
231 // ...... non-global search
232 // .. string search
237 if (IS_REGEXP(search)) {
240 var lastIndex = search.lastIndex;
242 %_Log('regexp', 'regexp-replace,%0r,%1S', [search, subject]);
247 if (!search.global) {
248 // Non-global regexp search, string replace.
249 var match = DoRegExpExec(search, subject, 0);
251 search.lastIndex = 0
263 // Global regexp search, string replace.
264 search.lastIndex = 0;
267 subject, search, replace, lastMatchInfo);
275 subject, search, replace, lastMatchInfo);
285 if (search.global) {
286 // Global regexp search, function replace.
287 return StringReplaceGlobalRegExpWithFunction(subject, search, replace);
289 // Non-global regexp search, function replace.
290 return StringReplaceNonGlobalRegExpWithFunction(subject, search, replace);
293 search = TO_STRING_INLINE(search);
295 if (search.length == 1 &&
302 return %StringReplaceOneCharWithString(subject, search, replace);
304 var start = %StringIndexOf(subject, search, 0);
306 var end = start + search.length;
313 result += %_CallFunction(receiver, search, start, subject, replace);
549 ["String.prototype.search"]);
989 "search", StringSearch,