> On 03 May 2017, at 8:25 am, Gerriet M. Denkmann <[email protected]> wrote:
>
> NSString *test2 = [ @"/some/path" stringByAppendingPathComponent: pintu
> ].lastPathComponent;
> [ self printTestString: test2 ];
> // prints: length 2 0x2d 0xe3a “-ฺ” BAD: has no prefix "-" NSPathStore2 ←
> NSString
> Why has test2 no prefix?
If I'm reading your code right, I would imagine this is because test2 obviously
begins with a slash ("/some/path/...") and not "-".
-[NSString hasPrefix:] :
> Returns a Boolean value that indicates whether a given string matches the
> beginning characters of the receiver.
-ben
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]