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 6469001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:56:34+00:00 2026-05-25T05:56:34+00:00

I using X code 4. And Making an US Currency Calculator. My Aim is

  • 0

I using X code 4.

And Making an US Currency Calculator.

My Aim is to display the numbers in proper format?

Like

$ 1,234

$12,100

$1,23,123

I dont want do this by appending , and string stuff.

Is there any easier way so that I can integrate any RE or
any ruby or Python. Which will help me to make currency format.

Please show me easier way rather than long programming.

  • 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-05-25T05:56:34+00:00Added an answer on May 25, 2026 at 5:56 am

    The NSNumberFormatter allows you to format currency. Example taken from [iOS developer:tips];

    // Create formatter
    NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];  
    //--------------------------------------------
    // Format style as currency, output to console
    //--------------------------------------------
    [formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
    NSString *formattedOutput = [formatter stringFromNumber:[NSNumber numberWithInt:1234]];
    NSLog(@"Output as currency: %@", formattedOutput);
    
    //--------------------------------------------
    // Change local and output as currency
    //--------------------------------------------
    NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"it_IT"];
    [formatter setLocale:locale];
    formattedOutput = [formatter stringFromNumber:[NSNumber numberWithInt:1234]];
    NSLog(@"Output as currency - locale it_IT: %@", formattedOutput);
    
    [locale release];
    [formatter release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if I'm using the sizeof operator and making use of size_t in my code,
I measure coverage for my code using gcov library and I would like to
I'm making a Win32 GUI project using Code::Blocks and the MinGW compiler. At this
I am using the code at http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/comment-page-1/#comment-14326 for building custom view. I wanted to
I'm making a DataService with Entity Framework 4.1 using Code First POCO objects. I
I was reading about making code more portable by using fixed-width integers. I found
I'm now making the transition towards writing all my javascript code using Coffeescript, But
I'm makin' a scripting language interpreter using PHP. I have this code in that
I'm using code that I found on the CodeProject.com for a low-level keyboard hook
I've recently started using code coverage tools (particularily Emma and EclEmma), and I really

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.