fmtcalc 0.1.0

A calculator that can be used like the println! macro of the Rust language.
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 18.02 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.21 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • kumavale/fmtcalc
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kumavale

fmtcalc

Actions Status Crate license

This is a simple calculator written in Rust.
It is an alternative to printf for shell command.

Examples

$ fmtcalc 4+2
6

$ fmtcalc "1+2*3 = {}" "1+2*3"
1+2*3 = 7

$ fmtcalc "0xFF - 654.321"
-399.321

$ fmtcalc "3²+4²={}, 5²={}" "3*3+4*4" "5*5"
 +4² =25, 5² =25

For better ergonomics I often abbreviate fmtcalc as println in your shell startup files:

alias println='fmtcalc'

Installation

$ cargo install fmtcalc

License

MIT