Re: NSURL from non-url NSString
Re: NSURL from non-url NSString
- Subject: Re: NSURL from non-url NSString
- From: Uli Kusterer <email@hidden>
- Date: Sun, 25 May 2014 08:25:31 -0700
On 25 May 2014, at 08:20, Koen van der Drift <email@hidden> wrote:
> I haven't figured that out yet, hence my question, maybe someone would recognize it. But so far I've seen it it for single word strings that begin with a letter, followed some numbers and letters.
Off the top of my head, I’d not have expected NSURL to be a parser in the sense that it knows what a valid URL is and isn’t. SO I’d just say it’s probably undefined behaviour due to you giving it a string that’s not a URL. Have you tried using NSDataDetector instead? Apple’s site has sample code:
https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSDataDetector_Class/Reference/Reference.html
Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden