Just added new methods in the proc-macro library on the Literal type:
proc-macro
Literal
str_value
cstr_value
byte_str_value
Hopefully it should help to unescape literals when manipulating proc-macro tokens. No need to do it in external crates anymore.
PR: https://github.com/rust-lang/rust/pull/139367
Mastodon is the best way to keep up with what's happening.
Follow anyone across the fediverse and see it all in chronological order. No algorithms, ads, or clickbait in sight.