How to perform operations in case of negative numbers?
I wanted to build a calculator app for android and for that I needed a parser to convert string expressions to be solved. Now Java and Kotlin doesn't support eval function and importing a javascript engine just for sake of an operation can open me up to various vulnerabilities. So I made my own calculator parser. Now it's working completely fine, all arithmetic operations are working fine except in negative numbers in crash. I do know what the problem is as I am splitting the string using...