#import <Foundation/Foundation.h>

int
main(void)
{
	NSAutoreleasePool *pool;
	pool = [NSAutoreleasePool new];

	NSURL *url = [[NSURL alloc] initWithString:@"mysql://sogo:bauBewa6@localhost:3306/sogo/sogo_sessions_folder"];
	NSLog (@"%@", [[url absoluteString] stringByDeletingLastPathComponent]);

	NSString *baseURL = [url absoluteString];
	NSRange range = [baseURL rangeOfString: @"/" options: NSBackwardsSearch];
	if (range.location != NSNotFound)
		baseURL = [baseURL substringToIndex: range.location];
	NSLog (@"%@", baseURL);

	return 0;
}
