Re: Simple C Question
Re: Simple C Question
- Subject: Re: Simple C Question
- From: Nathan Day <email@hidden>
- Date: Fri, 1 Feb 2002 00:29:00 +1030
No I think he means [[NSString alloc] initWithFormat:@"%c", 'c' ]
On Wednesday, January 30, 2002, at 11:43 AM, Brian Luft wrote:
On 1/29/02 1:12 PM, "Carla Lewis" <email@hidden> wrote:
I want to setStringValue of an NSString with variable of type char?
How
do I convert char-type to NSString type?
Use the *withCString functions.
Convenience constructor thingy:
[[NSString stringWithCString: "Blah"] retain]
Normal initializer:
NSString *myString = [[NSString alloc] initWithCString: "Blah"];