use-script 0.1.0

Small writing script subtag primitives for RustUse
Documentation
  • Coverage
  • 100%
    8 out of 8 items documented1 out of 8 items with examples
  • Size
  • Source code size: 5.75 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 356.16 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-locale
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-script

Small writing script subtag primitives for RustUse.

Example

use use_script::{is_script_code, parse_script_code};

let script = parse_script_code("latn").unwrap();

assert_eq!(script.as_str(), "Latn");
assert!(is_script_code("Cyrl"));

Scope

  • Validate 4-letter script subtags.
  • Normalize script subtags to title case.
  • Provide a small ScriptCode newtype for validated script subtags.

Non-goals

  • Unicode text shaping.
  • Font selection.
  • Transliteration.
  • Script detection.

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license