This function can be used to generate textual representation of vector like you see above.
| 32 | { |
| 33 | // This function can be used to generate textual representation of vector<uint8_t> like you see above. |
| 34 | std::string FormatBytesFromBuffer(std::vector<uint8_t> const & buffer) |
| 35 | { |
| 36 | std::stringstream ss; |
| 37 | for (size_t i = 1; i <= buffer.size(); i++) |
| 38 | { |
| 39 | ss << "0x" << NumToHex(buffer[i - 1]) << ", "; |
| 40 | if (i % 16 == 0) |
| 41 | ss << "\n"; |
| 42 | } |
| 43 | return ss.str(); |
| 44 | } |
| 45 | |
| 46 | auto const kDefaultLang = localisation::kDefaultNameIndex; |
| 47 | auto const kEnLang = localisation::kEnglishLanguageIndex; |