10 lines
271 B
Rust
10 lines
271 B
Rust
//
|
|
use std::collections::HashMap;
|
|
|
|
pub(crate) fn expand(template: &str, params: HashMap<&str, &str>) -> String {
|
|
let mut result = template.to_string();
|
|
for (key, value) in params {
|
|
result = result.replace(&format!("{{{key}}}"), value);
|
|
}
|
|
result
|
|
}
|