4 releases (2 breaking)

new 0.4.1 Jul 14, 2025
0.4.0 Sep 23, 2024
0.2.0 Jan 22, 2019
0.1.0 Jun 19, 2017

#1151 in Text processing

Download history 21/week @ 2025-03-23 22/week @ 2025-03-30 47/week @ 2025-04-06 60/week @ 2025-04-13 25/week @ 2025-04-20 57/week @ 2025-04-27 39/week @ 2025-05-04 75/week @ 2025-05-11 22/week @ 2025-05-18 8/week @ 2025-05-25 20/week @ 2025-06-08 43/week @ 2025-06-15 34/week @ 2025-06-22 17/week @ 2025-06-29 54/week @ 2025-07-06

152 downloads per month
Used in 3 crates

MIT license

51KB
1K SLoC

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));

isbn

Build Status

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

Dependencies

~1–1.6MB
~28K SLoC