| 2157 | } |
| 2158 | |
| 2159 | int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end) |
| 2160 | { |
| 2161 | int char_count = 0; |
| 2162 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 2163 | { |
| 2164 | unsigned int c; |
| 2165 | in_text += ImTextCharFromUtf8(&c, in_text, in_text_end); |
| 2166 | char_count++; |
| 2167 | } |
| 2168 | return char_count; |
| 2169 | } |
| 2170 | |
| 2171 | // Based on stb_to_utf8() from github.com/nothings/stb/ |
| 2172 | static inline int ImTextCharToUtf8_inline(char* buf, int buf_size, unsigned int c) |
no test coverage detected