| 1819 | } |
| 1820 | |
| 1821 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 1822 | { |
| 1823 | int bytes_count = 0; |
| 1824 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 1825 | { |
| 1826 | unsigned int c = (unsigned int)(*in_text++); |
| 1827 | if (c < 0x80) |
| 1828 | bytes_count++; |
| 1829 | else |
| 1830 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 1831 | } |
| 1832 | return bytes_count; |
| 1833 | } |
| 1834 | |
| 1835 | //----------------------------------------------------------------------------- |
| 1836 | // [SECTION] MISC HELPERS/UTILITIES (Color functions) |
no test coverage detected