#proc-macro #token #convert #neure

macro charize

Provide a simple proc macro convert token to char

2 releases

0.0.2 Aug 5, 2023
0.0.1 Aug 4, 2023

#455 in #token

Download history 5/week @ 2024-07-08 7/week @ 2024-07-15 4/week @ 2024-07-22 20/week @ 2024-07-29 16/week @ 2024-08-05 9/week @ 2024-08-12 20/week @ 2024-08-26 9/week @ 2024-09-02 14/week @ 2024-09-09 13/week @ 2024-09-16 26/week @ 2024-09-23 17/week @ 2024-09-30 5/week @ 2024-10-07 20/week @ 2024-10-14 7/week @ 2024-10-21

52 downloads per month
Used in 6 crates (via neure)

MPL-2.0 license

4KB

charize

Provide a simple proc macro charize convert token to char.

Usage

pub fn main() {
    assert_eq!('o', charize::charize!(o));
    assert_eq!('1', charize::charize!(1));
    assert_eq!('', charize::charize!());
    assert_eq!('P', charize::charize!(P));
    assert_eq!('@', charize::charize!(@));
    assert_eq!('&', charize::charize!(&));
}

LICENSE

MPL-2.0


lib.rs:

charize

Provide a simple proc macro charize convert token to char.

Usage

assert_eq!('o', charize::charize!(o));
assert_eq!('1', charize::charize!(1));
assert_eq!('', charize::charize!());
assert_eq!('P', charize::charize!(P));
assert_eq!('@', charize::charize!(@));
assert_eq!('&', charize::charize!(&));

LICENSE

MPL-2.0

No runtime deps