Function console_utils::input::reveal
source · pub fn reveal(str: &str, time_between: f64)Expand description
Reveals a string gradually, printing one character at a time with a specified time interval.
This function is useful for creating a typing effect or slowly displaying information to the user.
Arguments
str- The string to reveal gradually. Add here\nfor a new line.time_between- The time interval (in seconds) between each revealed character.
Example
use console_utils::input::reveal;
// Display "Hello World!" with a time interval of 0.1 seconds between each character.
reveal("Hello World!", 0.1);