从长字符串中获取想要的字符串
char hh[512]={0};
strcpy(hh,"PrinterSerialNumber:G11404;PrinterStatus");
string str;
str=hh;
str=str.replace(str.find("PrinterSerialNumber:"),strlen("PrinterSerialNumber:"),"");
str=str.replace(str.find("PrinterSerialNumber:"),strlen(";PrinterStatus"),"");
输出结果为:G11404
只想当咸鱼的程序员