NSString *s = [NSString stringWithCString:"Long dash symbol \xe2\x80\x94" encoding:(NSUTF8StringEncoding) ];
NSString *t = [NSString stringWithUTF8String:"Long dash symbol \xe2\x80\x94" ];
Is there any difference between these two line ?
CodePudding user response:
No, both methods call
- (instancetype)initWithBytes:(const void *)bytes
length:(NSUInteger)len
encoding:(NSStringEncoding)encoding;