• 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: Using MAPM with Cocoa/ObjectiveC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using MAPM with Cocoa/ObjectiveC


  • Subject: Re: Using MAPM with Cocoa/ObjectiveC
  • From: Martin Stanley <email@hidden>
  • Date: Fri, 3 Dec 2010 07:39:44 -0500

Duh!!! (Insert forehead slap here)

Thanks for the very quick response.

Martin

On 2010-12-02, at 11:47 PM, Stephen J. Butler wrote:

> Not at all familiar with this library but...
>
> On Thu, Dec 2, 2010 at 10:36 PM, Martin Stanley
> <email@hidden> wrote:
>>        int digits3 = m_apm_significant_digits(mapm3);
>>        char  out3[digits3 + 2]; // add 1 for the sign and 1 for the decimal point
>
> What about space for the '\0' terminator?
>
>>        m_apm_to_string(out3, DECIMAL_PLACES, mapm3);
>>
>>        NSString *str = [NSString stringWithFormat:@"%s", out3];
>
> You'd be better here using +[NSString stringWithUTF8String:]. Or
> +[NSString stringWithCString:encoding:]. Or -[NSString
> initWithBytes:length:encoding:] and then you don't need the '\0' at
> the end.

_______________________________________________

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

References: 
 >Using MAPM with Cocoa/ObjectiveC (From: Martin Stanley <email@hidden>)
 >Re: Using MAPM with Cocoa/ObjectiveC (From: "Stephen J. Butler" <email@hidden>)

  • Prev by Date: Re: [iOS] How to know when AVPlayer is ready to play its remote url music
  • Next by Date: Re: Basic HTTP program failed to compile
  • Previous by thread: Re: Using MAPM with Cocoa/ObjectiveC
  • Next by thread: Disable toolbar items
  • Index(es):
    • Date
    • Thread