| 2121 | } |
| 2122 | |
| 2123 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 2124 | { |
| 2125 | int bytes_count = 0; |
| 2126 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 2127 | { |
| 2128 | unsigned int c = (unsigned int)(*in_text++); |
| 2129 | if (c < 0x80) |
| 2130 | bytes_count++; |
| 2131 | else |
| 2132 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 2133 | } |
| 2134 | return bytes_count; |
| 2135 | } |
| 2136 | |
| 2137 | //----------------------------------------------------------------------------- |
| 2138 | // [SECTION] MISC HELPERS/UTILITIES (Color functions) |
no test coverage detected