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

Function dItoa

Engine/source/core/strings/stringFunctions.cpp:552–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552int dItoa(int n, char s[])
553{
554 int i, sign;
555
556 if ((sign = n) < 0) /* record sign */
557 n = -n; /* make n positive */
558 i = 0;
559 do { /* generate digits in reverse order */
560 s[i++] = n % 10 + '0'; /* get next digit */
561 } while ((n /= 10) > 0); /* delete it */
562 if (sign < 0)
563 s[i++] = '-';
564 s[i] = '\0';
565 dStrrev(s);
566 return dStrlen(s);
567}

Callers

nothing calls this directly

Calls 2

dStrrevFunction · 0.85
dStrlenFunction · 0.70

Tested by

no test coverage detected