我的控制台应用程序需要清空屏幕。我该如何真正地清空屏幕,就像Linux中的reset命令一样?
我尝试使用在谷歌上找到的方法,例如:
我尝试使用在谷歌上找到的方法,例如:
print!("{}[2J", 27 as char); // First attempt
print!("{}", termion::clear::All); // 'termion' crate, version 1.5.3
他们只是往下滚动,把前面的输出留在身后。我想通过Rust执行重置命令,但一定还有其他方法,对吧?