Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-13-2009, 08:25 AM   #3 (permalink)
brian515
Registered Member
 
Join Date: Feb 2009
Posts: 109
brian515 is on a distinguished road
Default

Quote:
Originally Posted by Bertrand21 View Post
you could split the url string by the "/" so it would split http://www.google.com/here

so use this code:

Code:
NSString *split2= @"http://www.google.com/here";
NSArray* split = [string2 componentsSeparatedByString:@"/"];
	NSString* webURL = [NSString stringWithFormat:@"%@",[split objectAtIndex:2]];
and that brings back Google
Awesome, thanks!

Another way I found to do it is that NSURL contains a path method. I can get the path, and subtract it from the full URL, and I am left with what I want.
brian515 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,637
Threads: 94,101
Posts: 402,822
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jessicagx69
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:33 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.