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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:18:31+00:00 2026-06-04T21:18:31+00:00

There is some existing code of the follow form which is used for format

  • 0

There is some existing code of the follow form which is used for format numerical values:

String.format( pattern, value )

Note that I cannot change the code itself – I can only change the format pattern supplied to the code.

What is the format pattern to output a currency symbol for the default locale? Essentially, I want to achieve the following output:

String.format( "...", 123 )  => $ 123
  • 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-04T21:18:34+00:00Added an answer on June 4, 2026 at 9:18 pm

    With the constraints you have given, I think it is impossible to achieve it.
    To get to the current Locale’s currency symbol, you’ll need a minimum of code.

    If you have absolutely no means to add code to the program, you’d best use the established symbol for “currency” (¤). It was established for this exact purpose, to symbolize currency absent any more specific symbol.

    If you can’t change the given code, but add code to the project as a whole, you can use that to find out the symbol best used. Once you have it, you can use it to create a pattern for the existing code to use for formatting.

    If you can find out in which Locale the original program will run in next, you could write a assistant program that uses that setting to fill your configuration.

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

Sidebar

Related Questions

Is there some magic existing code in MVC 2 to Html.Encode() strings and allow
I'm trying to improve some existing code which originally took 3 minutes to prepare
How to find potentially duplicate files in a given directory? Is there some existing
Is there some way to add to the existing maven configurations in the run
Is there some kind of JDBC driver which simply ignores database calls? For the
I need to add some extension points to our existing code, and I've been
Context: Windows7, VBScript, ADODB and ADOX. I have written some VBScript code which creates
Is there any existing code in Apache HttpClient or in the servlet API to
I'm new to StructureMap and have some existing code that I'm working with that
I am trying to clean up some existing code Sheets(Control).Select MyDir = Cells(2, 1)

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.