13.06.2012, 09:51
Hi guys,
I searched it, but I didn't find. I need function, that converts string to hex. I know, it's possible with sscanf, but I need to do that WITHOUT sscanf.
I really need this...
Thanks !
I searched it, but I didn't find. I need function, that converts string to hex. I know, it's possible with sscanf, but I need to do that WITHOUT sscanf.
pawn Код:
new
string[ 50 ],
hex
;
format( string, sizeof( string ), "%x%x", 0x000000 , 255 );
sscanf( string, "x", hex );
printf( "%d %x", hex, hex );
Thanks !