blob: ebd41bd346f7629d70f010888d393c1ab079f4f9 (
plain)
1
2
3
4
5
6
7
8
9
|
use std::{fs, path::Path, str::pattern::Pattern};
pub fn read(file: impl AsRef<Path>, p: impl Pattern) -> Vec<String> {
fs::read_to_string(file)
.expect("Failed to read file")
.split(p)
.map(|l| l.to_string())
.collect()
}
|