If offset in UTF-8 string doesn't land on rune, walk back until first byte of rune is reached.
| 558 | |
| 559 | // If offset in UTF-8 string doesn't land on rune, walk back until first byte of rune is reached. |
| 560 | static const char* fixPtrToRune(const char* _strBegin, const char* _curr) |
| 561 | { |
| 562 | for (; _curr > _strBegin && (*_curr & 0xc0) == 0x80; --_curr); |
| 563 | |
| 564 | return _curr; |
| 565 | } |
| 566 | |
| 567 | StringView strTail(const StringView _str, uint32_t _num) |
| 568 | { |