![]() |
CHGame 0.3.0
Libraries for the CHGame handheld
|
Number formatting without printf. More...
#include <stdint.h>Go to the source code of this file.
Functions | |
| char * | fmtInt (char *p, int32_t v) |
| Write an integer: "-123". | |
| char * | fmtMoney (char *p, int32_t v) |
| Write an amount of money: "$1234", "-$5". | |
| char * | fmtCash (char *p, int32_t v) |
| Write money with thousands separators: "$1,234". | |
| char * | fmtShort (char *p, int32_t v) |
| Write money short for a narrow space: as fmtMoney(), but "$12K" from $10,000. | |
| char * | fmtTime (char *p, uint16_t secs) |
| Write a time as minutes and seconds: "1:05". | |
| char * | fmtStr (char *p, const char *s) |
| Copy a string. | |
Number formatting without printf.
The SDK's snprintf pulls in ~3.5 KB (and has no l).