Re: [Q] NSDecimalSeparator
Re: [Q] NSDecimalSeparator
- Subject: Re: [Q] NSDecimalSeparator
- From: Joe Chan <email@hidden>
- Date: Sat, 10 Nov 2001 22:31:35 -0500
Yes, your explanation makes perfect sense. However, the docs for
NSDecimalNumber made no mention of NSUserDefaults, and the
langauge in there made it sound like I should look at the
content of NSDecimalseparator for the actual character. Given
that I've been staring at this all day, I thought gdb is
coloring the registers in my brains :-).
On Saturday, November 10, 2001, at 10:25 PM, Kurt Revis wrote:
NSDecimalSeparator is not the separator itself. It is an
identifier for the value in the user's defaults. See the
documentation for NSUserDefaults.
Specifically, what you want is
NSString *str = [[NSUserDefaults standardUserDefaults]
stringForKey:NSDecimalSeparator];
You get the output you saw because the the constant named
NSDecimalSeparator is really a string with the value
@"NSDecimalSeparator". Make sense?
--
Kurt Revis
email@hidden