• 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: Simple C Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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"];


  • Next by Date: Re: reading in text files
  • Next by thread: Re: reading in text files
  • Index(es):
    • Date
    • Thread