| 1988 | } |
| 1989 | |
| 1990 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 1991 | { |
| 1992 | int bytes_count = 0; |
| 1993 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 1994 | { |
| 1995 | unsigned int c = (unsigned int)(*in_text++); |
| 1996 | if (c < 0x80) |
| 1997 | bytes_count++; |
| 1998 | else |
| 1999 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 2000 | } |
| 2001 | return bytes_count; |
| 2002 | } |
| 2003 | |
| 2004 | //----------------------------------------------------------------------------- |
| 2005 | // [SECTION] MISC HELPERS/UTILITIES (Color functions) |
no test coverage detected