| 26 | namespace exporter { |
| 27 | |
| 28 | inline int HexCharToInt(const char c) { |
| 29 | int result; |
| 30 | auto [ptr, ec] = std::from_chars(&c, &c + 1, result, 16); |
| 31 | if (ec != std::errc() || ptr != &c + 1) { |
| 32 | LOGE("HexCharToInt error: %d (%s)", static_cast<int>(ec), |
| 33 | std::make_error_code(ec).message().c_str()); |
| 34 | return -1; |
| 35 | } |
| 36 | return result; |
| 37 | } |
| 38 | |
| 39 | size_t PsdTextAttribute::stringFormatTransform(std::vector<char>& dst, const uint8_t* src, |
| 40 | const int len) { |