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

Function getFileUrlVolumeSeparatorEnd

test/fixtures/snapshot/typescript.js:7642–7652  ·  view source on GitHub ↗
(url, start)

Source from the content-addressed store, hash-verified

7640 (charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */);
7641 }
7642 function getFileUrlVolumeSeparatorEnd(url, start) {
7643 var ch0 = url.charCodeAt(start);
7644 if (ch0 === 58 /* CharacterCodes.colon */)
7645 return start + 1;
7646 if (ch0 === 37 /* CharacterCodes.percent */ && url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) {
7647 var ch2 = url.charCodeAt(start + 2);
7648 if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */)
7649 return start + 3;
7650 }
7651 return -1;
7652 }
7653 /**
7654 * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files").
7655 * If the root is part of a URL, the twos-complement of the root length is returned.

Callers 1

getEncodedRootLengthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…