| 1754 | } |
| 1755 | |
| 1756 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 1757 | { |
| 1758 | int bytes_count = 0; |
| 1759 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 1760 | { |
| 1761 | unsigned int c = (unsigned int)(*in_text++); |
| 1762 | if (c < 0x80) |
| 1763 | bytes_count++; |
| 1764 | else |
| 1765 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 1766 | } |
| 1767 | return bytes_count; |
| 1768 | } |
| 1769 | |
| 1770 | //----------------------------------------------------------------------------- |
| 1771 | // [SECTION] MISC HELPERS/UTILTIES (Color functions) |
no test coverage detected