/* Convert a byte index (in an UTF-8 text) to character index. E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long  */
static uint32_t lv_txt_utf8_get_char_id(const char *txt, uint32_t byte_id)
/* Convert a byte index (in an UTF-8 text) to character index. E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long  */
static uint32_t lv_txt_utf8_get_char_id(const char *txt, uint32_t byte_id)
{
    uint32_t i        = 0;
    uint32_t char_cnt = 0;
    while(i < byte_id) {
        _lv_txt_encoded_next(txt, &i);
        char_cnt++;
    }
    return char_cnt;
}