Lets say i have the following cstring
char array[1000];
How i can convert it to NSString and vice verse.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Apple’s Developer Reference has a good article on this subject. Basically, you will do something like this:
if the string is UTF8 encoded. Otherwise, you can use
initWithCString:encoding:with which you can specify the encoding.Here is a list of available string encodings.