[][src]Function text_analysis::trim_to_words

pub fn trim_to_words(content: String) -> Result<Vec<String>>

Splits content of file into singe words as Vector. Returns result.

Example

#[test]
fn test() {
use text_analysis::trim_to_words;
let words = "(_test] {test2!=".to_string();
let trimmed = trim_to_words(words).unwrap();
let expected = vec!["test".to_string(), "test2".to_string()];
assert_eq!(trimmed, expected);
}