| 423 | } |
| 424 | |
| 425 | bool isAsciiUtf16Buffer(const View<uint8_t>& buffer) |
| 426 | { |
| 427 | auto i = int64_t{ 0 }; |
| 428 | while (i < buffer.length) |
| 429 | { |
| 430 | auto p = cpp::encoding::Utf16::codepoint(buffer.slice(i)); |
| 431 | |
| 432 | if (p > 127) |
| 433 | { |
| 434 | return false; |
| 435 | } |
| 436 | |
| 437 | i += cpp::encoding::Utf16::getByteCount(p); |
| 438 | } |
| 439 | |
| 440 | return true; |
| 441 | } |
| 442 | |
| 443 | String toAsciiString(const View<uint8_t>& buffer) |
| 444 | { |
nothing calls this directly
no test coverage detected