[Biococoa-dev] NSMutableData vs malloc

John Timmer jtimmer at bellatlantic.net
Sun Jul 17 08:30:45 EDT 2005


> 
> On Jul 16, 2005, at 9:11 PM, Koen van der Drift wrote:
> 
>> I changed it to:
>> 
>>         symbolString  = [[NSString alloc] initWithCString: (char *)
>> &aChar length: 1];
>> 
>> It seems to work (no compiler warnings) but I am not sure if this
>> is the right way to go.
> 
> 
> Just read in the docs that initWithCString is deprecated in 10.4, so
> we need to think of something else. The suggested method
> initWithCString:encoding only works in 10.4, so that's not going to
> help either.
> 
> any ideas?

I think you want "stringWithUTF8String" or some other method containing
UTF8.  It's the "modern" equivalent of C strings.

JT

_______________________________________________
This mind intentionally left blank





More information about the Biococoa-dev mailing list