https://github.com/unicode-rs/unicode-normalization
Unicode Normalization forms according to UAX#15 rules
https://github.com/unicode-rs/unicode-normalization
Last synced: 12 days ago
JSON representation
Unicode Normalization forms according to UAX#15 rules
- Host: GitHub
- URL: https://github.com/unicode-rs/unicode-normalization
- Owner: unicode-rs
- License: other
- Created: 2015-04-13T23:00:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-11-13T16:55:49.000Z (about 1 year ago)
- Last Synced: 2025-04-30T11:58:48.806Z (9 months ago)
- Language: Rust
- Homepage: https://unicode-rs.github.io/unicode-normalization
- Size: 2.51 MB
- Stars: 177
- Watchers: 8
- Forks: 43
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-list - unicode-normalization - rs | 88 | (Rust)
README
# unicode-normalization
[](https://travis-ci.org/unicode-rs/unicode-normalization)
[](https://docs.rs/unicode-normalization/)
Unicode character composition and decomposition utilities
as described in
[Unicode Standard Annex #15](http://www.unicode.org/reports/tr15/).
This crate requires Rust 1.36+.
```rust
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::();
assert_eq!(c, "ÅΩ");
}
```
## crates.io
You can use this package in your project by adding the following
to your `Cargo.toml`:
```toml
[dependencies]
unicode-normalization = "0.1.23"
```
## `no_std` + `alloc` support
This crate is completely `no_std` + `alloc` compatible. This can be enabled by disabling the `std` feature, i.e. specifying `default-features = false` for this crate on your `Cargo.toml`.