Re: converting C-strings to NSString
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