1、 删除空格和TAB
std::string content;
content.erase(std::remove(content.begin(),content.end(),' '),content.end());
content.erase(std::remove(content.begin(),content.end(),'\t'),content.end());
2、int转string和string相加
int k;
char buf[8] = {};
_itoa_s(k,buf,10);
std::string _tmp += std::string(buf);
3、string.replace替换
std::string Info;
std::string _tmp;
Info.replace(Info.find("设备标签"),sizeof("设备标签")-1,_tmp);
platDesc.append(stationame);
int pos = _PSDtmp[j].Alarm_Train_GroupNo.find("_",1);
platDesc.append(_PSDtmp[j].Alarm_Train_GroupNo,0,pos);
platDesc.assign(psd->Alarm_Train_GroupNo,0,psd->Alarm_Train_GroupNo.find("_",stationame.length()+1));