forked from mirrors/gecko-dev
Import the improvements made in mp4parse-rust repo. The changes would save some redundant copy when calling avif related APIs and provide the ability to get the alpha data of the parsed avif image. Differential Revision: https://phabricator.services.mozilla.com/D98950 |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| .cargo-checksum.json | ||
| Cargo.toml | ||
| COPYRIGHT | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| README.md | ||
Unicode character composition and decomposition utilities as described in Unicode Standard Annex #15.
extern crate unicode_normalization;
use unicode_normalization::char::compose;
use unicode_normalization::UnicodeNormalization;
fn main() {
assert_eq!(compose('A','\u{30a}'), Some('Å'));
let s = "ÅΩ";
let c = s.nfc().collect::<String>();
assert_eq!(c, "ÅΩ");
}
crates.io
You can use this package in your project by adding the following
to your Cargo.toml:
[dependencies]
unicode-normalization = "0.1.3"