* Format a byte array into a continuous hex string. * @param data Array to format * @return Converted string. */
| 75 | * @return Converted string. |
| 76 | */ |
| 77 | std::string FormatArrayAsHex(std::span<const uint8_t> data) |
| 78 | { |
| 79 | std::string str; |
| 80 | str.reserve(data.size() * 2 + 1); |
| 81 | |
| 82 | for (auto b : data) { |
| 83 | format_append(str, "{:02X}", b); |
| 84 | } |
| 85 | |
| 86 | return str; |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * Test if a character is (only) part of an encoded string. |