| 1832 | } |
| 1833 | |
| 1834 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 1835 | { |
| 1836 | int bytes_count = 0; |
| 1837 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 1838 | { |
| 1839 | unsigned int c = (unsigned int)(*in_text++); |
| 1840 | if (c < 0x80) |
| 1841 | bytes_count++; |
| 1842 | else |
| 1843 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 1844 | } |
| 1845 | return bytes_count; |
| 1846 | } |
| 1847 | |
| 1848 | //----------------------------------------------------------------------------- |
| 1849 | // [SECTION] MISC HELPERS/UTILTIES (Color functions) |
no test coverage detected