| 1769 | } |
| 1770 | |
| 1771 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 1772 | { |
| 1773 | int bytes_count = 0; |
| 1774 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 1775 | { |
| 1776 | unsigned int c = (unsigned int)(*in_text++); |
| 1777 | if (c < 0x80) |
| 1778 | bytes_count++; |
| 1779 | else |
| 1780 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 1781 | } |
| 1782 | return bytes_count; |
| 1783 | } |
| 1784 | |
| 1785 | //----------------------------------------------------------------------------- |
| 1786 | // [SECTION] MISC HELPERS/UTILITIES (Color functions) |
no test coverage detected