I have an array of unichars i need to convert it to nsstring. How can i do this?
Asked
Active
Viewed 4,329 times
1 Answers
11
NSString
has a method for that:
+ (id)stringWithCharacters:(const unichar *)chars length:(NSUInteger)length
-
Oh, I think this is better than mine – vodkhang Jun 24 '10 at 02:06
-
@vodkhang: it is, yours will fail since the unichar is 16-bits wide – Jason Coco Jun 24 '10 at 02:09
-
But how do you get the length of a unichar array? In other words what's the equivalent of `wcslen(foo*)`? – HairOfTheDog Mar 07 '13 at 03:26
-
The links is dead. – Warpzit Aug 10 '17 at 06:25