Calculator api

Is there a cocoa or even a third party library that would be able to take simple algebraic strings and provide me the answer?

After stumbling upon the right search terms, I found this page:


Evaluating Expressions in iOS with Objective-C and Swift

https://spin.atomicobject.com/2015/03/24/evaluate-string-expressions-ios-objective-c-swift/


Shows how to use NSExpression to perform the kind of calculations I would like to be able to perform.

Good find! I suppose all you'd need to do then is to add a bit of extra code to validate the input and replace any square or curly brackets with parentheses.

Calculator api
 
 
Q