Browse Source

bin2hex - Add alternative

OS390/rc1
heck 9 months ago
parent
commit
f27b87d587
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/std_utils.cc

+ 8
- 0
src/std_utils.cc View File

@ -374,6 +374,14 @@ namespace pEp {
ret.push_back((unsigned char)val_int);
}
return ret;
// alternative way
// std::string extract;
// for (std::string::const_iterator pos = hex_str.begin(); pos < hex_str.end(); pos += 2) {
// extract.assign(pos, pos + 2);
// ret.push_back(std::stoi(extract, nullptr, 16));
// }
// return ret;
}


Loading…
Cancel
Save