Crates.io | iso15924 |
lib.rs | iso15924 |
version | 0.1.0 |
source | src |
created_at | 2019-10-10 18:58:56.468335 |
updated_at | 2019-10-10 18:58:56.468335 |
description | ISO 15924 data. |
homepage | https://github.com/zeyla/iso15924.rs |
repository | https://github.com/zeyla/iso15924.rs.git |
max_upload_size | |
id | 171504 |
size | 105,303 |
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.
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
iso15924
requires at least Rust 1.34.
Add the following dependency to your Cargo.toml:
[dependencies]
iso15924 = "0.1"
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.
ISC. License info in LICENSE.md.