如何将字符串中的10进制数和16进制数提取出来,看以下代码: #include <stdio.h> typedef char TUINT8 ; typedef int TUINT32; TUINT32 Read_DecNumber(const TUINT8* str); TUINT32 Read_HexNumber(const TUINT8* str); int main(void) { int ret = Read_DecNumber("1000"); int d = R
//字符串转成16进制代码function strToHexStr(str:string):string;varc:char;ss:string;i:integer;beginwhile str<>'' do begin c:=str[1]; ss:=ss+format('%0x',[ord(c)]); delete(str,1,1);end;strtohexStr:= ss;end; //16进制字符串转换成字符串function HexStrToStr(const S