rpn_lib

Crates.iorpn_lib
lib.rsrpn_lib
version0.1.6
sourcesrc
created_at2022-05-18 23:28:03.737256
updated_at2022-11-29 00:07:45.844316
descriptionRPN(Reverse Polish Natation) library
homepagehttps://github.com/takeweb/rpn_lib/README.md
repositoryhttps://github.com/takeweb/rpn_lib
max_upload_size
id589403
size3,874
takeweb (takeweb)

documentation

README

RPN(Reverse Polish Notation) Calc

Reverse Polish Notation (RPN) Calc.

Installation

cargo add rpn_lib

Example

fn main() {
    let src = String::from("1 2 + 3 * ");
    let a = rpn_lib::eval(src).unwrap();
    println!("{}", a); // →9
}

Example2

fn main() {
    let result = rpn_lib::eval_from_str("1 2 3 * +");
    println!("{}", result); // →7
}
Commit count: 6

cargo fmt