Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - ladutsko/isbn-core: ISBN core

ISBN core. Contribute to ladutsko/isbn-core development by creating an account on GitHub.

Visit SiteGitHub - ladutsko/isbn-core: ISBN core

GitHub - ladutsko/isbn-core: ISBN core

ISBN core. Contribute to ladutsko/isbn-core development by creating an account on GitHub.

Powered by 0x5a.live 💗

ISBN core Main CI Maven Central javadoc

ISBN core is a small library that contains a representation object of ISBN-10 and ISBN-13 and tools to parse, validate and format one.

  • Java 1.5+
  • OSGi compatible
  • GraalVM compatible
<dependency>
    <groupId>com.github.ladutsko</groupId>
    <artifactId>isbn-core</artifactId>
    <version>1.5.3</version>
</dependency>
implementation 'com.github.ladutsko:isbn-core:1.5.3'

Quick start

import com.github.ladutsko.isbn.ISBN;
import com.github.ladutsko.isbn.ISBNException;
import com.github.ladutsko.isbn.ISBNFormat;

class HelloWorld {
    public static void main(String[] args) {
        try {
            ISBN isbn = ISBN.parseIsbn("0131872486"); // or 978-0131872486
            // Valid isbn string
            ISBNFormat format = new ISBNFormat();
            System.out.println(format.format(isbn.getIsbn10())); // output: 0-13-187248-6
            System.out.println(format.format(isbn.getIsbn13())); // output: 978-0-13-187248-6
        } catch (ISBNException e) {
            // Invalid isbn string
            e.printStackTrace(); // Reason
        }
    }
}

Java Resources

are all listed below.

Resources

listed to get explored on!!

Made with ❤️

to provide different kinds of informations and resources.