| 33 | namespace { |
| 34 | |
| 35 | size_t Utf8CharLength(const char* str, size_t len) { |
| 36 | if (len == 0) { |
| 37 | return 0; |
| 38 | } |
| 39 | const size_t charLen = UTF8Util::NextCharLength(str); |
| 40 | return charLen <= len ? charLen : 0; |
| 41 | } |
| 42 | |
| 43 | uint32_t Utf8CharKey(const char* str, size_t charLen) { |
| 44 | uint32_t key = static_cast<uint32_t>(charLen); |
no test coverage detected