| 1714 | } |
| 1715 | |
| 1716 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 1717 | { |
| 1718 | int bytes_count = 0; |
| 1719 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 1720 | { |
| 1721 | unsigned int c = (unsigned int)(*in_text++); |
| 1722 | if (c < 0x80) |
| 1723 | bytes_count++; |
| 1724 | else |
| 1725 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 1726 | } |
| 1727 | return bytes_count; |
| 1728 | } |
| 1729 | |
| 1730 | //----------------------------------------------------------------------------- |
| 1731 | // [SECTION] MISC HELPERS/UTILTIES (Color functions) |
no test coverage detected