Re: Very simple question
Re: Very simple question
- Subject: Re: Very simple question
- From: Jon Raphaelson <email@hidden>
- Date: Tue, 13 Jul 2004 21:11:53 -0600
You could use
[NSString stringWithFormat:@"(%d lines drawn)", num]
The format strings are the same as printf, with the addition of %@ to
print objective-c objects.
Jonathan Raphaelson
email@hidden
On Jul 13, 2004, at 08:46 PM, Theodore H. Smith wrote:
How do I dynamically construct a string? Like this:
(0 lines drawn)
(10 lines drawn)
(1000 lines drawn)
etc etc. I'm having trouble trying to turn my number into a string! I
can't find the right function to do it. I suppose there's always
sprintf, eh? I was hoping that maybe things would be easier under
Cocoa.
--
Theodore H. Smith - Software Developer.
http://www.elfdata.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.