• Heitor Araujo 5
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Dear all,

 

here is my problem/question.

 

In the controller (extension) of one of my pages, I get an expression in a String variable. 

I would like to know if the re is any solution for me to evaluate this expression from the String.

Let's say I get something like this:

 

String s = '(true AND false) OR true';

 

Is there any function (like the eval javascript function) that would allow me to evaluate my expression?

 

Boolean ret = eval(s); // true

 

Thank you everyone in advance.