aboutsummaryrefslogtreecommitdiff
path: root/src/util/serialization.rs
blob: fcb3062d70c561823119a239109755df418d1edc (plain)
1
2
3
4
5
6
7
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(" | ")
}