File: simple.rs

package info (click to toggle)
rust-formatx 0.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 180 kB
  • sloc: makefile: 4
file content (7 lines) | stat: -rw-r--r-- 205 bytes parent folder | download
1
2
3
4
5
6
7
use formatx::formatx;

fn main() {
    let template = "{} {0:-^10} {percentage:.2}";
    let text = formatx!(template, "world!", "hello", percentage = 99.9999);
    println!("{}", text.unwrap());
}