#isbn

isbn

A library for handling ISBNs

2 unstable releases

✓ Uses Rust 2018 edition

0.2.0 Jan 22, 2019
0.1.0 Jun 19, 2017
Download history 4/week @ 2019-11-27 17/week @ 2019-12-04 16/week @ 2019-12-11 3/week @ 2019-12-18 10/week @ 2019-12-25 8/week @ 2020-01-01 47/week @ 2020-01-08 56/week @ 2020-01-15 38/week @ 2020-01-22 3/week @ 2020-01-29 14/week @ 2020-02-05 32/week @ 2020-02-12 15/week @ 2020-02-19 21/week @ 2020-02-26 18/week @ 2020-03-04 9/week @ 2020-03-11

52 downloads per month
Used in 2 crates

MIT license

22KB
472 lines

isbn

Build Status

A library for handling International Standard Book Number, or ISBNs.


lib.rs:

A library for handling International Standard Book Number, or ISBNs.

Examples

use isbn::{Isbn10, Isbn13};

let isbn_10 = Isbn10::new(8, 9, 6, 6, 2, 6, 1, 2, 6, 4).unwrap();
assert_eq!(isbn_10.hyphenate().unwrap().as_str(), "89-6626-126-4");
assert_eq!(isbn_10.registration_group(), Ok("Korea, Republic"));
assert_eq!("89-6626-126-4".parse(), Ok(isbn_10));

let isbn_13 = Isbn13::new(9, 7, 8, 1, 4, 9, 2, 0, 6, 7, 6, 6, 5).unwrap();
assert_eq!(isbn_13.hyphenate().unwrap().as_str(), "978-1-4920-6766-5");
assert_eq!(isbn_13.registration_group(), Ok("English language"));
assert_eq!("978-1-4920-6766-5".parse(), Ok(isbn_13));

Dependencies

~115KB