Skip to main content

apply_less_equal

Function apply_less_equal 

Source
pub fn apply_less_equal(left: &Value, right: &Value) -> bool
Expand description

Apply less-than-or-equal comparison between two values

ยงExamples

use libmagic_rs::parser::ast::Value;
use libmagic_rs::evaluator::operators::apply_less_equal;

assert!(apply_less_equal(&Value::Uint(10), &Value::Uint(10)));
assert!(apply_less_equal(&Value::Uint(5), &Value::Uint(10)));
assert!(!apply_less_equal(&Value::Uint(10), &Value::Uint(5)));