| AntiDebug LIB Function Reference | |
GJ_sprintf |
int GJ_sprintf( char *buffer, const char *format, ... )
returns the number of bytes stored in buffer, not counting the terminating null character.
compatible partly with sprintf
format type : %d,%i,%u,%x,%X
datatype :INT(int),UINT(unsigned
int),LONG(long int),ULONG(unsigned long int)
The float,double and long
double data types are not supported.
for example:
/*
char buffer[100];
INT X1=1;
int X2=2;
UINT X3=3;
unsigned int X4=4;
LONG X5=5;
long X6=6;
ULONG X7=7;
unsigned long X8=8;
GJ_sprintf(buffer,"X1=%05d X2=%i X3=%u X4=%x X5=%X X6=%d X7=%d X8=%08d",X1,X2,X3,X4,X5*X8,X6,X7,X8);
//result: buffer "X1=00001 X2=2 X3=3
X4=4 X5=28 X6=6 X7=7 X8=00000008"
*/