MCPcopy Create free account
hub / github.com/cinder/Cinder / ImTextCalcWordWrapNextLineStart

Function ImTextCalcWordWrapNextLineStart

src/imgui/imgui_draw.cpp:5344–5352  ·  view source on GitHub ↗

Trim trailing space and find beginning of next line

Source from the content-addressed store, hash-verified

5342
5343// Trim trailing space and find beginning of next line
5344const char* ImTextCalcWordWrapNextLineStart(const char* text, const char* text_end, ImDrawTextFlags flags)
5345{
5346 if ((flags & ImDrawTextFlags_WrapKeepBlanks) == 0)
5347 while (text < text_end && ImCharIsBlankA(*text))
5348 text++;
5349 if (*text == '\n')
5350 text++;
5351 return text;
5352}
5353
5354// Simple word-wrapping for English, not full-featured. Please submit failing cases!
5355// This will return the next location to wrap from. If no wrapping if necessary, this will fast-forward to e.g. text_end.

Callers 2

ImFontCalcTextSizeExFunction · 0.85
RenderTextMethod · 0.85

Calls 1

ImCharIsBlankAFunction · 0.85

Tested by

no test coverage detected