Lines Matching refs:str
575 * @param {string} str
577 function removeHTTPWhitespace (str, leading = true, trailing = true) {
579 let trail = str.length - 1
582 for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++);
586 for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--);
589 return str.slice(lead, trail + 1)
603 function removeASCIIWhitespace (str, leading = true, trailing = true) {
605 let trail = str.length - 1
608 for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++);
612 for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--);
615 return str.slice(lead, trail + 1)