Crates.io | maitakedayo_rpn_calc |
lib.rs | maitakedayo_rpn_calc |
version | 0.1.1 |
source | src |
created_at | 2023-06-14 09:30:32.51722 |
updated_at | 2023-06-14 09:30:32.51722 |
description | RPN(Reverse Polish Notatio) library |
homepage | https://github.com/maitakedayo/ |
repository | |
max_upload_size | |
id | 889949 |
size | 3,596 |
Reverse Polish notation (RPN) Calc.
fn main() {
let src = String::from("1 2 + 3 * ");
let a = rpn_calc::eval(src).unwrap();
println!("{}", a); // →9
}
fn main() {
let result = rpn_calc::eval_str("1 2 3 * +");
println!("{}", result); // →7
}