• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSNumberFormatters and [] characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSNumberFormatters and [] characters


  • Subject: NSNumberFormatters and [] characters
  • From: Angela Brett <email@hidden>
  • Date: Sun, 31 Oct 2004 11:59:21 +1300

Hi,

I've been asked to display negative currencies in the app I'm writing in red with [Dr] after them. It didn't make much sense to me (apparently Dr stands for debit record) but it is consistent with the way the same information is displayed on the website, so I'll go along with it. I'm using an NSNumberFormatter to format the currencies, which was fine back when I was indicating negative numbers with the negative sign. But now that I try to enter [Dr] in the negative format, either in IB or in code, the [ and ] disappear. I've read the documentation on format string syntax, which has no mention of any special meaning for those two characters, and says:

All other characters specified in a number format string are displayed as typed.

Is this a bug? If so, is it a bug in NSNumberFormatter, or just a bug in the documentation? Does anyone know if there is a way of getting [ and ] to appear? I've tried [[ and \[ to no avail.
--
Angela Brett
email@hidden
http://NSCoder.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Prev by Date: Re: How do I get the compiler to warn me if I forget to return self?
  • Next by Date: Re: vDSP, anyone using it?
  • Previous by thread: Re: Cocoa-dev Digest, Vol 1, Issue 210
  • Next by thread: Re: vDSP, anyone using it?
  • Index(es):
    • Date
    • Thread