iso15924 0.1.0

ISO 15924 data.
Documentation
  • Coverage
  • 100%
    262 out of 262 items documented8 out of 16 items with examples
  • Size
  • Source code size: 106.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 9.47 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • zeyla

ci-badge license-badge docs-badge rust badge

iso15924.rs

Rust crate for ISO 15924 data, retrieved from unicode.org.

Data in the crate is updated every week from the table on unicode.org.

Also provided is a constant with the source URL of the data and parsing functionality to parse it, so that you can request the data yourself for the most up-to-date information.

What is ISO 15924?

ISO 15924, Codes for the representation of names of scripts, defines two sets of codes for a number of writing systems (scripts). Each script is given both a four-letter code and a numeric one. Script is defined as "set of graphic characters used for the written form of one or more languages".

-- Wikipedia

Installation

iso15924 requires at least Rust 1.34.

Add the following dependency to your Cargo.toml:

[dependencies]

iso15924 = "0.1"

Examples

Retrieve a slice of all ScriptCode definitions:

use iso15924::ScriptCode;

fn main() {
    let scripts = ScriptCode::all();

    println!("Amount: {}", scripts.len());
}

Retrieve a ScriptCode by its number:

use iso15924::ScriptCode;

fn main() {
    let script = ScriptCode::by_num("412");

    if let Some(script) = script {
        println!("Script name: {}", script.name);
    }
}

For more examples and information please look in the docs.

License

ISC. License info in LICENSE.md.