From 7cce0f6d1da7da822c9a2b0db67574d5b15eb02d Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 13 Jun 2018 18:27:17 +0000 Subject: [PATCH] Add clearScreen to console git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4246 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- console.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/console.php b/console.php index 2699a25..f56163c 100644 --- a/console.php +++ b/console.php @@ -628,6 +628,15 @@ private $usleep = 0; } // }}} + /** Clear all the screen and remove the scroll of the screen + */ + public function clearScreen () + // {{{ + { + echo "\033[2J\033[;H\033c"; + } + // }}} + /** Call a specific function when a completion key is pressed * @param string|bool $completionKeys The list of the completion keys. False * unset the method