blob: cc2899fc8cd212a89fa05a4f3227d669be3b42a8 (
plain)
1
2
3
4
5
6
7
8
9
10
|
pub fn line_to_words(line: &String) -> Vec<String> {
line.split("|")
.map(|w| w.trim().to_string())
.filter(|w| !w.is_empty())
.collect()
}
pub fn words_to_line(words: &Vec<String>) -> String {
words.join(" | ")
}
|