MCPcopy Index your code
hub / github.com/microsoft/SandDance / parseSpecifier

Function parseSpecifier

docs/app/js/sanddance-app.js:112498–112510  ·  view source on GitHub ↗
(d, specifier, string, j)

Source from the content-addressed store, hash-verified

112496 };
112497 }
112498 function parseSpecifier(d, specifier, string, j) {
112499 var i = 0, n = specifier.length, m = string.length, c, parse;
112500 while(i < n){
112501 if (j >= m) return -1;
112502 c = specifier.charCodeAt(i++);
112503 if (c === 37) {
112504 c = specifier.charAt(i++);
112505 parse = parses[c in pads ? specifier.charAt(i++) : c];
112506 if (!parse || (j = parse(d, string, j)) < 0) return -1;
112507 } else if (c != string.charCodeAt(j++)) return -1;
112508 }
112509 return j;
112510 }
112511 function parsePeriod(d, string, i) {
112512 var n = periodRe.exec(string.slice(i));
112513 return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;

Callers 4

newParseFunction · 0.70
parseLocaleDateTimeFunction · 0.70
parseLocaleDateFunction · 0.70
parseLocaleTimeFunction · 0.70

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected