8.string转Binary

CBinary string2CBinary(string strSr)
{
CBinary binCsCode;
if(strSrc.size() == 0)
{
returnX { y 2 [ k binCsCode;
}
//组成binary需i / 3 L要的格式,如"0xAB,0x12,0x23"
string strDest;
string strTemp;
for(int i=0;i<strSrc.0 C $ [size();i++
{
strTemp += strSrc.at(i);
if((i+1)%2 == 0)
{
strDest += "0x" + strTemp + ",";
strTemp.clear();
}
}
strDest = strDest.su2 m 6bstr(0,strDest.size()-1);
binCsCode = TextToBin(strDest);
return binCsCode;
}