| Crates.io | charify |
| lib.rs | charify |
| version | 0.1.6 |
| created_at | 2021-11-26 22:17:34.713159+00 |
| updated_at | 2021-11-26 22:18:32.408959+00 |
| description | A simple proc macro to turn its token input into a char, similar to the built-in stringify! macro. |
| homepage | |
| repository | https://github.com/PROMETHIA-27/charify |
| max_upload_size | |
| id | 488173 |
| size | 5,913 |
A simple proc macro to turn its token input into a char, similar to the built-in stringify! macro.
println!("Hell{}, w{}rld!", charify!(o), charify!(o));
Result: "Hello, world!"
println!("What{} Outrageous{}", charify!(?), charify!(!))
Result: "What? Outrageous!"
Somehow, the proc macro causes a strange issue that reports "range end index 4 out of range for slice of length 3". I have no idea what this is referring to, and it's not a true compile error, as it compiles and runs fine. It appears that only rust-analyzer has a problem. If this is something I can fix, please let me know (open an issue on github) and I will fix it, but as it stands I think this is just a bug in rust-analyzer.