| Crates.io | string-literal-const-replace |
| lib.rs | string-literal-const-replace |
| version | 0.1.0 |
| created_at | 2025-02-12 20:45:13.942868+00 |
| updated_at | 2025-02-12 20:45:13.942868+00 |
| description | Proc macro for compile-time find/replace on string literals |
| homepage | |
| repository | https://github.com/JarredAllen/string-literal-const-replace |
| max_upload_size | |
| id | 1553458 |
| size | 19,957 |
This is a proc macro which allows you to, at compile time, perform find/replace on string literals. This macro is intended to be called by other macros, to do processing on inputs provided to the macro.
Note that this macro is nightly-only as it relies on the
proc_macro_expand unstable feature.
Example of use:
assert_eq!(
string_literal_replace!("hello, world!" ("hello" -> "goodbye")),
"goodbye, world!"
);