Hello guys,
here i am trying to compare the hosts of 2 URLs, eventhought that hosts are the same it does not respond why? !
here i am trying to compare the hosts of 2 URLs, eventhought that hosts are the same it does not respond why? !
Code:
NSURL *url=[NSURL URLWithString:@"http://www.facebook.com/"?ref=logo" ];
NSURL *domain=[ NSURL URLWithString:@"http://www.facebook.com" ];
if ( [url host]==[domain host] ) {
NSLog(@"hosts are matched");
}else {
NSLog(@"hosts are not matched!");
}