pub fn f_string<P: AsRef<str>>(s: P) -> Result<String, Box<dyn Error>>
Expand description
Read string from file. Example:
let mut s = String::from("");
match f_string("./config.toml") {
Ok(st) => s = st,
Err(e) => eprintln!("{e}"),
}
}