rustorm 0.20.0

An orm for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate meval;

fn trim_parenthesis(arg: &str) -> &str {
    arg.trim_start_matches('(').trim_end_matches(')')
}

pub fn maybe_trim_parenthesis(arg: &str) -> &str {
    if arg.starts_with('(') && arg.ends_with(')') {
        trim_parenthesis(arg)
    } else {
        arg
    }
}

pub fn eval_f64(expr: &str) -> Result<f64, meval::Error> {
    meval::eval_str(expr)
}