You need to increment `t_end_pos` by one after you have copied the substring (that's what `MCU_skip_char` does).