Terminal applications have a “cursor” that they can move around, just like a text editor. You can tell that cursor “go to line 3, delete everything, then print out this new text” by using VT100 sequences. And you can use it to replace existing characters with new ones, without re-emitting a whole line.
for (int start = 0; start < gap; start++) {
,推荐阅读搜狗输入法2026获取更多信息
drag-and-drop interface for easy content creation
EPA/Shutterstock