I have a unicode string like that @”anh sẽ đến”. Now I want to cut it to a char array, and then I want to join it in one string and show it on the screen. How can I do that?
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.
Because literals are objects, you can use
[@"anh sẽ đến" UTF8String]to get it to a char array, and[NSString stringWithUTF8String:]for char to NSString conversions, though to be honest, it would probably be easier to just use+[NSString stringWithFormat:@"anh sẽ đến%c", myUnichar]than to go back and forth between string containers.