I have a string like 10+20*30-40/2. Is it possible to split this string and do calculations like + for addition, or * for multiplication?
I have a string like 10+20*30-40/2 . Is it possible to split this string
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could do this very easily with the
evalfunction…Here is a working example
But you should be careful, because if you are accepting user input for this string then it could be malicious.