Lines Matching refs:length
8 * Supports negative start and length and omitting length, but not
12 function substr_replace(str, replace, start, length) {
14 a2 = (start < 0 ? str.length : 0) + start;
15 if (typeof length === 'undefined') {
16 length = str.length - a2;
17 } else if (length < 0 && start < 0 && length <= start) {
18 length = 0;
20 b1 = (length < 0 ? str.length : a2) + length;