You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
525 B
Rust

type Column = Vec<String>;
type Columns = Vec<Column>;
// split input text into columns based on separator character
// returns a type representing a variable length array of strings (columns) ?
pub fn split_columns(text: &str, sep: char) -> Option<Columns> {
Some(Columns::new())
}
#[test]
fn test_split_columns(){
let coltext1 = r###"
file1.txt title1
file2.pdf title2
file3 title3
"###;
let columns = split_columns(coltext1, '\t');
println!("columns:\n{:?}", columns);
}