Text Placeholder

A flexible text template engine that allows templates with named placeholders within it.

Placeholders are defined by default following the handlebars syntax, but can be overriden with specific boundaries.

In order to provide the context in which our placeholders will be replaced the following options are available:

Example

```rust use text_placeholder::Template; use std::collections::HashMap;

let default_template = Template::new("Hello {{first}} {{second}}!");

let mut table = HashMap::new(); table.insert("first", "text"); table.insert("second", "placeholder");

asserteq!(defaulttemplate.fillwithhashmap(&table), "Hello text placeholder!");

// We can also specify our own boundaries:

let customtemplate = Template::newwith_placeholder("Hello $[first]] $[second]!", "$[", "]");

asserteq!(defaulttemplate.fillwithhashmap(&table), "Hello text placeholder!"); ```

Roadmap

This project is inspired by the awesome text-template repository.