print_text

Function print_text 

Source
pub fn print_text(
    text: &str,
    color: Option<&str>,
    end: &str,
    writer: Option<&mut dyn Write>,
)
Expand description

Print text with highlighting and optional color.

§Arguments

  • text - The text to print.
  • color - Optional color for the text.
  • end - The string to append at the end (default is empty).
  • writer - Optional writer to output to (defaults to stdout).

§Example

use agent_chain_core::utils::input::print_text;

print_text("Hello, World!", Some("blue"), "", None);