Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8553889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:45:25+00:00 2026-06-11T14:45:25+00:00

Possible Duplicate: What is a fast C or Objective-C math parser? I have a

  • 0

Possible Duplicate:
What is a fast C or Objective-C math parser?

I have a create a function which takes a formula as a NSString. And I have to replace few things in the String and get the value after executing the formula. How can I do this…

Ex: NSString *formulaString = @”((A/B)-1)*100″;

Now I can replace A by 20, and B by 10.
But how will get calculated value that is ((20/10)-1)*100 as 100

Thanks,
Ben

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:45:26+00:00Added an answer on June 11, 2026 at 2:45 pm

    You can replace the characters by this method

    NSString *formulaString = @"((A/B)-1)*100";
    
    NSString *modifiedFormulaString = [formulaString stringByReplacingOccurrencesOfString:@"A" withString:@"10"];
    
    modifiedFormulaString = [modifiedFormulaString stringByReplacingOccurrencesOfString:@"B" withString:@"10"];
    

    But to calculate dat u need to parse it using some parser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Does fast enumeration in Objective-C guarantee the order of iteration? Just a
Possible Duplicate: How to replace only one parameter or fast with Jquery on Jquery
Possible Duplicate: Objective C Equivalent of PHP's “Variable Variables” I'm studding Objective-C and have
Possible Duplicate: Calling virtual function of derived class from base class constructor? I have
Possible Duplicate: Converting NSString to NSDate (and back again) I have a NSString representation
Possible Duplicate: Fast way to convert a Bitmap into a Boolean array in C#?
Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: Objective C for Windows iPhone development on Windows Is there any way
Possible Duplicate: Compute fast log base 2 ceiling What is the fastest possible way
Possible Duplicate: What is considered fast performance for a single server request? I'm building

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.