umlauts

Crates.ioumlauts
lib.rsumlauts
version0.2.0-alpha.3
sourcesrc
created_at2020-12-07 23:43:31.675794
updated_at2020-12-11 17:01:26.981087
descriptionlibrary for text transformation of german umlauts
homepagehttps://github.com/rappet/umlauts
repositoryhttps://github.com/rappet/umlauts
max_upload_size
id320653
size16,001
Raphael Peters (rappet)

documentation

README

Rust library for german umlauts

Usage

# Cargo.toml

# Safe without manipulating &mut str
[dependencies]
umlauts = "0.1"

# Unsafe conversions with the ability to manipulate &mut str
umlauts = { version = "0.1", features = [ "unsafe" ] }

Examples

extern crate umlauts;

use umlauts::UmlautsOwned;

let mut s = "Öl Ärmel Übermut".to_string();
s.make_utf8_umlauts_lowercase();
assert_eq!("öl ärmel übermut", s);

Unsafe Features

&mut str manipulation

By default, this crate itself does not use unsafe features, except from the memchr dependency. To allow manipulating of references to String and &mut str, the unsafe feature can be used. As the manipulating functions operate on &mut [u8] and will always return valid UTF-8 if valid UTF-8 is given, those unsafe features should perform the same.

Commit count: 27

cargo fmt