rust-locale
rust_locale
provides various functions dependent on locale specified in POSIX.1.
The main purpose is to provide something that is not in char
methods or that differs in behavior from char
methods.
Dependency
[dependencies]
rust-locale = "0.1"
Examples
use CType;
// space is different from whitespace
assert!; # form feed
set_var;
assert!; # Em Space
assert!; # Ethiopic Wordspace
set_var;
assert!;
// different behavior from char::to_uppercase
set_var;
assert_eq!;
set_var;
assert_eq!; # Latin Capital Letter I with Dot Above
These tests may fail depending on the locales' definition.
Future plan
Feature requests are welcome.
License
rust-locale
uses Gnulib for the platform compatibility. Gnulib is LGPL and rust-locale
links to it statically, therefore rust-locale
is also LGPL.
If you use rust-locale
and not want to adapt LGPL, you may need to link to rust-locale
dynamically.
If that is difficult, I will consider linking rust-locale
to Gnulib dynamically and change rust-locale
's license to MIT.