iof 0.4.0

Read from and write data to console or file in simple formats.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use iof::{read_m_n, read_n, read_one, ASCIIChar, Mat};

fn main() {
    let c: ASCIIChar = read_one();
    assert_eq!(c, ASCIIChar::Digit1);

    let v: Vec<ASCIIChar> = read_n(2);
    assert_eq!(v, [ASCIIChar::Digit2, ASCIIChar::Digit3]);

    let m: Mat<ASCIIChar> = read_m_n(2, 3);
    assert_eq!(
        m,
        [
            [ASCIIChar::Digit4, ASCIIChar::Digit5, ASCIIChar::Digit6],
            [ASCIIChar::Digit7, ASCIIChar::Digit8, ASCIIChar::Digit9],
        ]
    );
}