cprintf
cprintf supported this env
- nodejs
- broswer
- webchat app
install via npm
npm install cprintf --save
this lib include two functions
string ;
void ;
usage
// import functionconst sprintf = sprintf;const printf = printf; // c-like printf; // c-like sprintfvar strText = ;;console; // direct printf a JSON objectvar xxObj = a : 1 b : 2;;
support formats just like c printf and sprintf
- %c -- ascii value
- %d -- signed number
- %s -- string
- %x -- number in hex
- %i -- signed number
- %f -- float
- %o -- octal number
- %u -- unsigned number