fmt_printf

Macro fmt_printf 

Source
macro_rules! fmt_printf {
    ($($arg:tt)*) => { ... };
}
Expand description

Logs to the console using std::println! macro and returns the formatted string.

ยงExamples

use fmt_log::fmt_printf;

let s1 = "Hello";
let s2 = String::from("world!");
let n1 = 123;

let output = fmt_printf!("{}, {} {}", s1, s2, n1);

assert_eq!(output, format!("{}, {} {}", s1, s2, n1));

This will log "Hello, world! 123" to the console.