Convert byte vector to string vector
int convert_byte_vector_to_string_vector( const vector<byte> & vn, vector<string> & vs )
the number of converted items
EX1
void convert_byte_vector_to_string_vector_ex1() { vector<string> strVec(10); vector<byte> byteVec = {11,12,13,14,15,16,17,18}; int nRet = convert_byte_vector_to_string_vector(byteVec , strVec); if(nRet) { printf("%d items converted :\n" , nRet);//Output: 8 items converted : 11 12 13 14 15 16 17 18 for(int ii = 0; ii < strVec.GetSize() ; ii++) printf("%s " , strVec[ii]); printf("\n"); } else printf("Convert failed"); }
convert_double_vector_to_string_vector, convert_int_vector_to_string_vector, convert_string_vector_to_byte_vector
origin.h