MCPcopy Create free account
hub / github.com/Lovrom8/RSMods / InputTextCalcTextLenAndLineCount

Function InputTextCalcTextLenAndLineCount

DLL/Lib/ImGUI/imgui_widgets.cpp:3600–3612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3598}
3599
3600static int InputTextCalcTextLenAndLineCount(const char* text_begin, const char** out_text_end)
3601{
3602 int line_count = 0;
3603 const char* s = text_begin;
3604 while (char c = *s++) // We are only matching for \n so we can ignore UTF-8 decoding
3605 if (c == '\n')
3606 line_count++;
3607 s--;
3608 if (s[0] != '\n' && s[0] != '\r')
3609 line_count++;
3610 *out_text_end = s;
3611 return line_count;
3612}
3613
3614static ImVec2 InputTextCalcTextSizeW(const ImWchar* text_begin, const ImWchar* text_end, const ImWchar** remaining, ImVec2* out_offset, bool stop_on_new_line)
3615{

Callers 1

InputTextExMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected