substitute 0.2.0

extremly simple string templating
Documentation
  • Coverage
  • 53.85%
    7 out of 13 items documented0 out of 8 items with examples
  • Size
  • Source code size: 14.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • lolbinarycat

trivial string templates based on the FORTH word of the same name.

the primary advantage over str::replace is that it can perform multiple replacements while only allocating one new string.

a template is a string that contains several substitutions.

a substitution starts with '%', then has any number of of charachers in its name, then ends with '%'. substitution names are case-sensitive.

a Substituter maps a substitution name to its replacement

the substitution %% always has the replacment %. this is to allow escaping of literal percentage signs.

has no_std support, and can support str and [u8] templates.