Home | History | Annotate | Download | only in String

Lines Matching full:replace

32 * str.replace(strA, strB) == str.replace(new RegExp(strA),strB).
33 * See ECMA-262 Final Draft, 15.5.4.11 String.prototype.replace
37 * String.prototype.replace (searchValue, replaceValue), if provided
38 * a searchValue that is not a RegExp, is NO LONGER to replace it with
44 * This puts the replace() method at variance with search() and match(),
51 var summ_OLD = 'Testing str.replace(strA, strB) == str.replace(new RegExp(strA),strB)';
52 var summ_NEW = 'Testing String.prototype.replace(x,y) when x is a string';
73 * When this bug was filed, str.replace(strA, strB) would return no value
85 actual = str.replace(strA, strB);
86 expect = str.replace(new RegExp(strA), strB);
91 actual = str.replace(strA, strB);
92 expect = str.replace(new RegExp(strA), strB);
97 actual = str.replace(strA, strB);
98 expect = str.replace(new RegExp(strA), strB);
103 actual = str.replace(strA, strB);
104 expect = str.replace(new RegExp(strA), strB);
118 actual = strJim.replace(strA, strB); // bug -> 'aaZaa'
119 expect = strJim.replace(new RegExp(strA), strB); // expect 'aa$aaZ'
124 * Note: 'Zabc' is the result we expect for 'abc'.replace('', 'Z').
132 actual = str.replace(strA, strB);
138 actual = str.replace(strA, strB);
139 expect = str.replace(new RegExp(strA), strB);
148 actual = 'abc'.replace('a', 'Z');
153 actual = 'abc'.replace('b', 'Z');
158 actual = 'abc'.replace(undefined, 'Z');
163 actual = 'abc'.replace(null, 'Z');
168 actual = 'abc'.replace(true, 'Z');
173 actual = 'abc'.replace(false, 'Z');
178 actual = 'aa$aa'.replace('$', 'Z');
183 actual = 'abc'.replace('.*', 'Z');
188 actual = 'abc'.replace('', 'Z');