I'm working on an OS X app, running XCode 6.4 and Yosemite. Distilling the problem down to a couple lines of code, I'm using substringWithRange to extract a substring and getting a string that's 18 characters long, but I was expecting a string with 26 characters. What am I doing wrong?
// 12345678901234567890123456789
NSString *s = @"ClientÅåÄäÖöÅåÆæØø_Example #2";
NSRange range = NSMakeRange(0, 26);
NSString *result = [s substringWithRange:range];
// 12345678901234567890123456
// ClientÅåÄäÖöÅåÆæØø
Aucun commentaire:
Enregistrer un commentaire