| 598 | |
| 599 | |
| 600 | inline std::string pure_slice::hexString() const { |
| 601 | static const char kDigits[17] = "0123456789abcdef"; |
| 602 | std::string result; |
| 603 | result.reserve(2 * size); |
| 604 | for (size_t i = 0; i < size; i++) { |
| 605 | uint8_t byte = (*this)[(unsigned)i]; |
| 606 | result += kDigits[byte >> 4]; |
| 607 | result += kDigits[byte & 0xF]; |
| 608 | } |
| 609 | return result; |
| 610 | } |
| 611 | |
| 612 | |
| 613 | #pragma mark COMPARISON & FIND: |
no outgoing calls
no test coverage detected