- upcase
- downcase
- capitalize
Liquid filters on strings: upcase, downcase, capitalize
examples/liquid/liquid-filters-strings/src/main.rs
fn main() { let template = liquid::ParserBuilder::with_stdlib() .build() .unwrap() .parse(" plain: {{text}} upcase: {{text | upcase}} downcase: {{text | downcase}} capitalize: {{text | capitalize}} ").unwrap(); let text = "this is Some tExt"; let globals = liquid::object!({ "text": text, }); let output = template.render(&globals).unwrap(); println!("{}", output); }
examples/liquid/liquid-filters-strings/out.txt
plain: this is Some tExt upcase: THIS IS SOME TEXT downcase: this is some text capitalize: This is Some tExt