• 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: Trying to make an NSString...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to make an NSString...


  • Subject: Re: Trying to make an NSString...
  • From: Vince DeMarco <email@hidden>
  • Date: Sun, 28 Apr 2002 20:25:06 -0700

On Sunday, April 28, 2002, at 08:15 PM, Joel Rosenblum wrote:

I want to make an NSString which contains a tab character. Since I can't put that into the @"" literal construct, I figured I'd try putting it into a CString and then making the NSString from that. Here was my unsuccessful attempt:

char cTabString[2];
id tabString;
cTabString[0] = 9;
cTabString[1] = 0;
tabString = [NSString initWithCString:cTabString]

So what am I doing wrong? I get some unhelpful compiler warnings such as:


It should be

[[NSString alloc] initWithCString:cTabString]

or just do this

@"\t"

vince
_______________________________________________
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.

References: 
 >Trying to make an NSString... (From: Joel Rosenblum <email@hidden>)

  • Prev by Date: Seeing an objects retain count
  • Next by Date: Re: Trying to make an NSString...
  • Previous by thread: Trying to make an NSString...
  • Next by thread: Re: Trying to make an NSString...
  • Index(es):
    • Date
    • Thread