A arnieterm macrumors regular Original poster Aug 28, 2008 201 0 Oct 15, 2008 #1 I have an NSString that contains the phone # [only phone number]. I want to format this string to display in this way "###-###-####". What parameter should I pass to stringWithFormat or initWithFormat? Can anybody suggest? Thanks
I have an NSString that contains the phone # [only phone number]. I want to format this string to display in this way "###-###-####". What parameter should I pass to stringWithFormat or initWithFormat? Can anybody suggest? Thanks
robbieduncan Moderator emeritus Jul 24, 2002 25,611 893 Harrogate Oct 15, 2008 #2 Personally I'd use the class that's actually designed for formatting numbers. The well documented NSNumberFormatter.
Personally I'd use the class that's actually designed for formatting numbers. The well documented NSNumberFormatter.