Jump to content

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}}==
1,149

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.