MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / ImTextFindValidUtf8CodepointEnd

Function ImTextFindValidUtf8CodepointEnd

imgui_tiny_app/imgui/imgui.cpp:2829–2839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2827}
2828
2829const char* ImTextFindValidUtf8CodepointEnd(const char* in_text_start, const char* in_text_end, const char* in_p)
2830{
2831 if (in_text_start == in_p)
2832 return in_text_start;
2833 const char* prev = ImTextFindPreviousUtf8Codepoint(in_text_start, in_p);
2834 unsigned int prev_c;
2835 int prev_c_len = ImTextCharFromUtf8(&prev_c, prev, in_text_end);
2836 if (prev_c != IM_UNICODE_CODEPOINT_INVALID && prev_c_len <= (int)(in_p - prev))
2837 return in_p;
2838 return prev;
2839}
2840
2841int ImTextCountLines(const char* in_text, const char* in_text_end)
2842{

Callers 2

STB_TEXTEDIT_INSERTCHARSFunction · 0.85
InsertCharsMethod · 0.85

Calls 2

ImTextCharFromUtf8Function · 0.85

Tested by

no test coverage detected