| 2802 | } |
| 2803 | |
| 2804 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 2805 | { |
| 2806 | int bytes_count = 0; |
| 2807 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 2808 | { |
| 2809 | unsigned int c = (unsigned int)(*in_text++); |
| 2810 | if (c < 0x80) |
| 2811 | bytes_count++; |
| 2812 | else |
| 2813 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 2814 | } |
| 2815 | return bytes_count; |
| 2816 | } |
| 2817 | |
| 2818 | const char* ImTextFindPreviousUtf8Codepoint(const char* in_text_start, const char* in_p) |
| 2819 | { |
no test coverage detected