convert_string 0.2.0

A trait to convert Strings to safe non-keywords and/or convert a Strings case (snake_case, PascalCase, ...).
Documentation
1
2
3
4
5
6
7
8
9
10
/// Simple macro that allows defining a const array without specifying the length.
/// taken from <https://github.com/JoelCourtney/check_keyword>
macro_rules! arr {
    ($id:ident $name:ident: [$ty:ty; _] = $value:expr) => {
        $id $name: [$ty; $value.len()] = $value;
    };
    (pub $id:ident $name:ident: [$ty:ty; _] = $value:expr) => {
        pub $id $name: [$ty; $value.len()] = $value;
    }
}