iso15924

Crates.ioiso15924
lib.rsiso15924
version0.1.0
sourcesrc
created_at2019-10-10 18:58:56.468335
updated_at2019-10-10 18:58:56.468335
descriptionISO 15924 data.
homepagehttps://github.com/zeyla/iso15924.rs
repositoryhttps://github.com/zeyla/iso15924.rs.git
max_upload_size
id171504
size105,303
Zeyla Hellyer (zeyla)

documentation

http://docs.rs/iso15924

README

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.

Commit count: 0

cargo fmt