Crates.io | fmtcalc |
lib.rs | fmtcalc |
version | 0.1.0 |
source | src |
created_at | 2020-06-30 13:58:50.448783 |
updated_at | 2020-06-30 13:58:50.448783 |
description | A calculator that can be used like the println! macro of the Rust language. |
homepage | |
repository | https://github.com/kumavale/fmtcalc |
max_upload_size | |
id | 259839 |
size | 18,548 |
This is a simple calculator written in Rust.
It is an alternative to printf for shell command.
$ 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"
3² +4² =25, 5² =25
For better ergonomics I often abbreviate fmtcalc
as println
in your shell startup files:
alias println='fmtcalc'
$ cargo install fmtcalc
MIT