Re: What am I looking for in the documentation?
Re: What am I looking for in the documentation?
- Subject: Re: What am I looking for in the documentation?
- From: Sean McBride <email@hidden>
- Date: Mon, 06 May 2013 12:03:38 -0400
- Organization: Rogue Research Inc.
On Sat, 4 May 2013 16:20:14 -0700, YT said:
>I have need to turn a local float value into a char array.
>
>That is, The Quartz 2D graphics function requires the passing of a
>(const char *) to a text string or I was thinking of a character array.
>
>My mind is mush at the moment - can't seem to recall the way to program
>a conversion of
>
>float fv = 40.0;
>
>into
>
>const char *text = "40.0";
>
>or
>
>const char text[ ] = "40.0";
Also consider localisation... do you absolutely want the '.' character, or whatever decimal character is specified by the user's locale (or the user himself)? Consider NSNumberFormatter if you want localisation.
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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