| 2005 | } |
| 2006 | |
| 2007 | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end) |
| 2008 | { |
| 2009 | int bytes_count = 0; |
| 2010 | while ((!in_text_end || in_text < in_text_end) && *in_text) |
| 2011 | { |
| 2012 | unsigned int c = (unsigned int)(*in_text++); |
| 2013 | if (c < 0x80) |
| 2014 | bytes_count++; |
| 2015 | else |
| 2016 | bytes_count += ImTextCountUtf8BytesFromChar(c); |
| 2017 | } |
| 2018 | return bytes_count; |
| 2019 | } |
| 2020 | |
| 2021 | //----------------------------------------------------------------------------- |
| 2022 | // [SECTION] MISC HELPERS/UTILITIES (Color functions) |
no test coverage detected