Skip to main content

evaluate

Function evaluate 

Source
pub fn evaluate(args: &[String]) -> Result<bool, String>
Expand description

Evaluate a test expression given as a slice of string arguments.

Returns Ok(true) if the expression is true, Ok(false) if false, and Err(msg) on syntax/parse errors.

This implements a recursive descent parser for the POSIX test expression grammar with GNU extensions.