PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings in Application Protocols as described in rfc8264
This crate implements the next PRECIS profiles:
- rfc8265. Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords.
- rfc8266. Preparation, Enforcement, and Comparison of Internationalized Strings Representing Nicknames
assert_eq!(Nickname::prepare("Guybrush Threepwood"),
Ok(Cow::from("Guybrush Threepwood")));
assert_eq!(Nickname::enforce(" Guybrush Threepwood "),
Ok(Cow::from("Guybrush Threepwood")));
assert_eq!(Nickname::compare("Guybrush Threepwood ",
"guybrush threepwood"), Ok(true));
Patches and feedback are welcome.
If you find this project helpful, you may consider making a donation:
This project is licensed under either of