home ~ projects ~ socials

Include A File As An str In Rust

fn main() {
  let content = include_str!("alfa.txt");
  println!("{}", content);
}
Output:
this is alfa

don't rely on the contens in this file
it's mainly for access of system modified
time stuff
-- end of line --