Skip to main content

eval

Function eval 

Source
pub fn eval(string: &str) -> EvalexprResultValue
Expand description

Evaluate the given expression string.

ยงExamples

use evalexpr::*;

assert_eq!(eval("1 + 2 + 3"), Ok(Value::from_int(6)));

See the crate doc for more examples and explanations of the expression format.