Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString and char *




+ stringWithCString:encoding:
Returns a string containing the characters in cString, which must end with a NULL character and which may not be NULL.


+ stringWithUTF8String:
Returns a string created by copying the characters from bytes, which may not be NULL.






– initWithCString:encoding:
Initializes the receiver, a newly allocated NSString, by converting the characters in cString from the specified encoding into the Unicode character encoding.


– initWithUTF8String:
Initializes the receiver, a newly allocated NSString, by copying the characters from bytes.






On Feb 11, 2006, at 5:47 PM, Lars Elden wrote:

I am mixing ObjC and C compiled files. How to initialize a NSString from a
char * C string ?


thanks!

Lars


______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSString and char * (From: "Lars Elden" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.