MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / ImTextCountUtf8BytesFromStr

Function ImTextCountUtf8BytesFromStr

include/imgui/imgui.cpp:2763–2775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2761}
2762
2763int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end)
2764{
2765 int bytes_count = 0;
2766 while ((!in_text_end || in_text < in_text_end) && *in_text)
2767 {
2768 unsigned int c = (unsigned int)(*in_text++);
2769 if (c < 0x80)
2770 bytes_count++;
2771 else
2772 bytes_count += ImTextCountUtf8BytesFromChar(c);
2773 }
2774 return bytes_count;
2775}
2776
2777const char* ImTextFindPreviousUtf8Codepoint(const char* in_text_start, const char* in_p)
2778{

Callers 1

Calls 1

Tested by

no test coverage detected