Skip to main content

text_is_self_contained_arithmetic_expression

Function text_is_self_contained_arithmetic_expression 

Source
pub fn text_is_self_contained_arithmetic_expression(text: &str) -> bool
Expand description

Returns whether text parses as an arithmetic expression without variable references, subscripts, shell words, or assignments.

This is useful when a caller needs a purely self-contained arithmetic value. Invalid or empty text returns false.