• 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: converting C-strings to NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: converting C-strings to NSString


  • Subject: Re: converting C-strings to NSString
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 23 Oct 2001 05:09:43 +0100

recursivecall,

>>>>>> email@hidden (r) wrote at Mon, 22 Oct 2001 22:26:00 -0400:
r> [scratch initWithCString: buffer];
r> secondbuffer = [secondbuffer stringByAppendingString: scratch];
r>
r> This is probably not the best way of doing it, however, it runs fine,

It just happens to. Use [NSString stringWithCString:], plus local
autorelease pool if the loop is iterated many times.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


References: 
 >converting C-strings to NSString (From: email@hidden)

  • Prev by Date: Re: Making an NSString from NSData
  • Next by Date: "Required AppleEvents"
  • Previous by thread: Re: converting C-strings to NSString
  • Next by thread: Re: converting C-strings to NSString
  • Index(es):
    • Date
    • Thread