Simple Calculator in Android MVVM
A calculator app using LiveData and DataBinding for solving mathematical expressions.
In computer science, the shunting yard algorithm is a method for parsing arithmetical or logical expressions https://github.com/jfransp/ExpressionParserUtil-Android-Library
IF answer(String) = "2.0", then show "2"
if(model.result!!.indexOf(".") > 0){
model.result = model.result!!.replace(Regex("0+?$"), "")
model.result = model.result!!.replace(Regex("[.]$"), "")
}



