Crates.io | format_env |
lib.rs | format_env |
version | 1.0.1 |
source | src |
created_at | 2020-11-13 02:30:07.072886 |
updated_at | 2020-11-13 23:35:58.534245 |
description | Substitutes environment variables into a string literal at compile time |
homepage | https://gitlab.com/GrantMoyer/format_env |
repository | https://gitlab.com/GrantMoyer/format_env |
max_upload_size | |
id | 311813 |
size | 7,614 |
Substitues environment variables into a string literal at compile time.
Example:
use format_env::format_env;
assert_eq!(format_env!("Name: $(CARGO_PKG_NAME), License: $(CARGO_PKG_LICENSE)"), "Name: format_env, License: MIT")
assert_eq!(format_env!("Name: $$(CARGO_PKG_NAME)"), "Name: $(CARGO_PKG_NAME)")