strfile-rs 0.1.0

crates.io badge TravisCI badge

Tiny crate for reading strfile headers, which are indexed representations of quote files used in fortune utility.

It is a hobby project, so pull requests are welcome. :)

Usage

```rust extern crate strfile;

use strfile::Strfile;

fn displaystrfileheader(header: &Strfile) { println!("Version:\t{}", header.version); println!("Strings:\t{}", header.numberofstrings); println!("Longest:\t{}", header.longestlength); println!("Shortest:\t{}", header.shortestlength); println!("Delimeter:\t{:?}", header.delim as char);

println!("Randomized:\t{}", header.is_random());
println!("Ordered:\t{}", header.is_ordered());
println!("ROT13:\t\t{}", header.is_rotated());
println!("Comments:\t{}\n", header.has_comments());

}

let header = Strfile::parse("quotes.dat").unwrap(); let quotes = h.readquotes(quotesfn).unwrap();

println!("{:?}", header); ```

TODO