MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fx_Date_parse_fraction

Function fx_Date_parse_fraction

xs/sources/xsDate.c:263–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263txInteger fx_Date_parse_fraction(txByte* theCharacter, txString* theString)
264{
265 txByte c = *theCharacter;
266 txString p = *theString;
267 txNumber fraction = 100;
268 txNumber aResult = ((c - '0') * fraction);
269 c = c_read8(p++);
270 while (('0' <= c) && (c <= '9')) {
271 fraction /= 10;
272 aResult = aResult + ((c - '0') * fraction);
273 c = c_read8(p++);
274 }
275 *theCharacter = c;
276 *theString = p;
277 return (txInteger)c_trunc(aResult);
278}
279
280void fx_Date_parse(txMachine* the)
281{

Callers 1

fx_Date_parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected