I want to evaluate the string expression without using script engine:
string expression can be like:
"((true&&(!false)||true)&&true)&&true"
Anybody have any idea how this can be done in android using kotlin
Thanks
Add a new dependency
dependencies {
implementation 'net.objecthunter:exp4j:0.4.8'
}
var value = TextView.text.toString()
var result = ExpressionBuilder(value).build().evaluate()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With