Re: strange behaviour of hasPrefix

2017-05-04 Thread Andy Lee
On May 3, 2017, at 11:25 AM, Gerriet M. Denkmann wrote: > Why has test2 no prefix? Seems like a subtle difference between the implementations of __NSCFConstantString/__NSCFString and NSPathStore2/NSString. I ran your code and got the same results. I also added a bunch of sanity checks and the

Re: strange behaviour of hasPrefix

2017-05-03 Thread Ben Kennedy
> On 03 May 2017, at 8:25 am, Gerriet M. Denkmann wrote: > > NSString *test2 = [ @"/some/path" stringByAppendingPathComponent: pintu > ].lastPathComponent; > [ self printTestString: test2 ]; > // prints: length 2 0x2d 0xe3a “-ฺ” BAD: has no prefix "-" NSPathStore2 ← > NSString > Wh