MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / fixPtrToRune

Function fixPtrToRune

Source/3rdParty/bx/src/string.cpp:560–565  ·  view source on GitHub ↗

If offset in UTF-8 string doesn't land on rune, walk back until first byte of rune is reached.

Source from the content-addressed store, hash-verified

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 {

Callers 1

strTailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected