Answer the question
In order to leave comments, you need to log in
Calculate string values?
Good morning/afternoon!
I need to embed a calculator on my website. For example, I submit a string to the function input 1 + 2 * 3
(not necessarily with spaces, these are users, after all!) I tried to find a similar library, but in vain. I could write it myself, but it will be difficult to process the order of actions, brackets, and I don’t want to build my own bike.
Maybe someone had a similar problem? Eval do not offer.
It is desirable to add the ability to use small functions - for example, like this:
x = 5 * 7
y = x + 5
z = sqrt(y)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question