pub fn line_to_words(line: &str) -> Vec<String> {
    line.split('|')
        .map(|w| w.trim().to_string())
        .filter(|w| !w.is_empty())
        .collect()
}

pub fn words_to_line(words: &[String]) -> String {
    words.join(" | ")
}