Function jja::quote::print_quote
source · pub fn print_quote(idx: Option<usize>, porcelain: bool)
Expand description
The quote
module provides a function to print a random quote related to chess.
Functions
print_quote()
- Prints a random quote from a predefined list of chess-related quotes.search_quote()
- Searchs a quote within a predefined list of chess-related quotes.wrap_quote()
- Wraps the given text to fit within the specified line width.
Constants
QUOTE_MAX: usize
- The number of quotes in the predefined list.QUOTE: [(&str, &str); QUOTE_MAX]
- An array containing tuples of quotes and their respective authors. Prints a random quote from a predefined list of chess-related quotes. The quote is formatted with a maximum line width of 72 characters. Ifporcelain
is true, no formatting is done.