I want to develop a class/method that takes as input a string of this format: "((true | false) & (!false & false))"
, and returns true
or false
, accordingly (in this case false
).
How should I proceed?
I want to develop a class/method that takes as input a string of this format: "((true | false) & (!false & false))"
, and returns true
or false
, accordingly (in this case false
).
How should I proceed?
if performance is not the issue AND you're really sure that the boolean expression is safe (security reasons), you can launch a full-blown JavaScript engine and evaluate the expression
like described in the following question.