Terminal control/Clear the screen: Difference between revisions
→{{header|Ruby}}: added console method
(add RPL) |
(→{{header|Ruby}}: added console method) |
||
Line 1,223:
(equivalent to <code>`clear`</code>)
<syntaxhighlight lang="ruby">puts "\e[H\e[2J"</syntaxhighlight>
Probably more platform-independent:
<syntaxhighlight lang="ruby">require 'io/console'
STDOUT.clear_screen
</syntaxhighlight>
=={{header|Rust}}==
|