Function file_into_string::file_into_strings
source · [−]Expand description
Read a File into a Vec
use std::fs::File;
use file_into_string::*;
let file: File = File::open("example.txt").unwrap();
let strings: Vec<String> = file_into_strings(file).unwrap();
Note: this function deliberately preserves line endings,
which are \n
newlines and \r
carriage returns.