Is there way to solve the string equations in ios ?
For example
Input:
NSString * str =@\"1+2\";
Output:
<
What you can do is, You can get the components of the string separated by the sign "+" using this method and then you will get the array of components i.e. 1,2.
NSArray* foo = [str componentsSeparatedByString: @"+"];
int result = [[foo objectAtIndex:0] integerValue] + [[foo objectAtIndex:1] integerValue];
and then you can use the integer value for those two elements and add them and store the result in an integer variable.