MCPcopy
hub / github.com/webpack/webpack / rangeEqualsLower

Function rangeEqualsLower

lib/html/syntax.js:320–328  ·  view source on GitHub ↗
(input, start, end, lit)

Source from the content-addressed store, hash-verified

318 * @returns {boolean} true if the range equals `lit` ignoring ASCII case
319 */
320const rangeEqualsLower = (input, start, end, lit) => {
321 if (end - start !== lit.length) return false;
322 for (let i = 0; i < lit.length; i++) {
323 let c = input.charCodeAt(start + i);
324 if (c >= 0x41 && c <= 0x5a) c += 0x20;
325 if (c !== lit.charCodeAt(i)) return false;
326 }
327 return true;
328};
329
330/**
331 * Content mode for the just-opened tag whose name spans `input[start..end)`,

Callers 3

getContentModeForRangeFunction · 0.85
walkHtmlTokensFunction · 0.85
internLowerNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected