• 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
Re: NSNumberFormatter not working for me ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNumberFormatter not working for me ?


  • Subject: Re: NSNumberFormatter not working for me ?
  • From: Bill Hernandez <email@hidden>
  • Date: Tue, 13 Apr 2010 17:26:48 -0500

On Apr 13, 2010, at 5:18 PM, Keary Suska wrote:

> Sorry, I missed that. Anyway, it may be because the format is being interpreted using 10.4 behavior, in which case the format may not be valid and may be ignored. Have you tried single-quoting all non-hash marks (pound signs) to eliminate their special significance?
>
> You may need to watch out for integer overflow issues as well, if you are targeting 32bit systems.
>
> Keary Suska

Keary,

// +---------+---------+---------+---------+---------+---------+---------+---------+
- (void)awakeFromNib
{
	// I have already run a routine to strip all non digits by this time
	NSString *strippedNumber = @"1234567890";

	NSString *phoneNumber;
	phoneNumber = [BHUtility bhFormatNumberString:strippedNumber withFormat:@"'('###')' ###'-'####"];
	NSLog(@"[4626] phoneNumber = %@", phoneNumber);
}
// +---------+---------+---------+---------+---------+---------+---------+---------+

I tried changing the format to @"'('###')' ###'-'####" but the results were the same.


Bill Hernandez
Plano, Texas_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSNumberFormatter not working for me ?
      • From: Keary Suska <email@hidden>
References: 
 >NSNumberFormatter not working for me ? (From: Bill Hernandez <email@hidden>)
 >Re: NSNumberFormatter not working for me ? (From: Keary Suska <email@hidden>)
 >Re: NSNumberFormatter not working for me ? (From: Jens Alfke <email@hidden>)
 >Re: NSNumberFormatter not working for me ? (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: NSNumberFormatter not working for me ?
  • Next by Date: Re: NSNumberFormatter not working for me ?
  • Previous by thread: Re: NSNumberFormatter not working for me ?
  • Next by thread: Re: NSNumberFormatter not working for me ?
  • Index(es):
    • Date
    • Thread