eval

Function eval 

Source
pub fn eval(expression: &str) -> Result<Decimal, String>
Expand description

Evaluates an expression string with the standard library.

ยงExamples

use expr_solver::eval;

let result = eval("2 + 3 * 4").unwrap();
assert_eq!(result.to_string(), "14");