MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/Cauldron / InputTextCalcTextLenAndLineCount

Function InputTextCalcTextLenAndLineCount

libs/imgui/imgui.cpp:8148–8160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8146}
8147
8148static int InputTextCalcTextLenAndLineCount(const char* text_begin, const char** out_text_end)
8149{
8150 int line_count = 0;
8151 const char* s = text_begin;
8152 while (char c = *s++) // We are only matching for \n so we can ignore UTF-8 decoding
8153 if (c == '\n')
8154 line_count++;
8155 s--;
8156 if (s[0] != '\n' && s[0] != '\r')
8157 line_count++;
8158 *out_text_end = s;
8159 return line_count;
8160}
8161
8162static ImVec2 InputTextCalcTextSizeW(const ImWchar* text_begin, const ImWchar* text_end, const ImWchar** remaining, ImVec2* out_offset, bool stop_on_new_line)
8163{

Callers 1

InputTextExMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected