dimanche 22 février 2015

How to change one character to string in string variable

I have string "2x+3" and I want change 'x' to string "8".



String operation = "2x+3";
String x = "8";


And I want result such as "2*8+3"


or



String operation = "x+3";
String x = "8";


And I want result such as "8+3"


Does anyone know how to solve ?


Aucun commentaire:

Enregistrer un commentaire