MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / dItoa

Function dItoa

Engine/source/core/strings/stringFunctions.cpp:614–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614int dItoa(int n, char s[])
615{
616 int i, sign;
617
618 if ((sign = n) < 0) /* record sign */
619 n = -n; /* make n positive */
620 i = 0;
621 do { /* generate digits in reverse order */
622 s[i++] = n % 10 + '0'; /* get next digit */
623 } while ((n /= 10) > 0); /* delete it */
624 if (sign < 0)
625 s[i++] = '-';
626 s[i] = '\0';
627 dStrrev(s);
628 return dStrlen(s);
629}

Callers 1

parseAttributesMethod · 0.85

Calls 2

dStrrevFunction · 0.85
dStrlenFunction · 0.70

Tested by

no test coverage detected