MCPcopy Index your code
hub / github.com/nodejs/node / indexOfIgnoringCase

Function indexOfIgnoringCase

test/fixtures/snapshot/typescript.js:142669–142682  ·  view source on GitHub ↗
(str, value)

Source from the content-addressed store, hash-verified

142667 }
142668 // Assumes 'value' is already lowercase.
142669 function indexOfIgnoringCase(str, value) {
142670 var n = str.length - value.length;
142671 var _loop_8 = function (start) {
142672 if (every(value, function (valueChar, i) { return toLowerCase(str.charCodeAt(i + start)) === valueChar; })) {
142673 return { value: start };
142674 }
142675 };
142676 for (var start = 0; start <= n; start++) {
142677 var state_3 = _loop_8(start);
142678 if (typeof state_3 === "object")
142679 return state_3.value;
142680 }
142681 return -1;
142682 }
142683 function toLowerCase(ch) {
142684 // Fast convert for the ascii range.
142685 if (ch >= 65 /* CharacterCodes.A */ && ch <= 90 /* CharacterCodes.Z */) {

Callers 1

matchTextChunkFunction · 0.85

Calls 1

_loop_8Function · 0.85

Tested by

no test coverage detected