Trim trailing space and find beginning of next line
| 5342 | |
| 5343 | // Trim trailing space and find beginning of next line |
| 5344 | const 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. |
no test coverage detected