Function console_utils::reveal

source ·
pub fn reveal(str: &str, time_between: f64, new_line: bool)
Expand description

Reveal Function

Displays a string gradually, revealing one character at a time with a specified time interval between each character.

Arguments

  • str - The string to reveal gradually.
  • time_between - The time interval (in seconds) between each revealed character.
  • new_line - If true, adds a newline character after the revelation.

Example

use console_utils::reveal;

// Display "Hello World!" with a time interval of 0.1 seconds between each character and a new line after it's finished.
reveal("Hello World!", 0.1, true);