/* Check next character in a string and decide if the character is part of the command or not  */
bool lv_txt_is_cmd(lv_txt_cmd_state_t *state, uint32_t c)
/* Check next character in a string and decide if the character is part of the command or not  */
bool lv_txt_is_cmd(lv_txt_cmd_state_t *state, uint32_t c)
{
    bool ret = false;
    if(c == (uint32_t)LV_TXT_COLOR_CMD[0]) {
        if(*state == LV_TXT_CMD_STATE_WAIT) {
            *state = LV_TXT_CMD_STATE_PAR;
            ret = true;
        } else if(*state == LV_TXT_CMD_STATE_PAR) {
            *state = LV_TXT_CMD_STATE_WAIT;
        } else if(*state == LV_TXT_CMD_STATE_IN) {
            *state = LV_TXT_CMD_STATE_WAIT;
            ret = true;
        }
    }
    if(*state == LV_TXT_CMD_STATE_PAR) {
        if(c == ' ') {
            *state = LV_TXT_CMD_STATE_IN;
        }
        ret = true;
    }
    return ret;
}