Index: src/OFURL.h ================================================================== --- src/OFURL.h +++ src/OFURL.h @@ -183,6 +183,13 @@ * Set the fragment part of the URL. * * \param fragment The fragment part of the URL to set */ - (void)setFragment: (OFString*)fragment; + +/** + * \brief Returns the URL as a string. + * + * \return The URL as a string + */ +- (OFString*)string; @end Index: src/OFURL.m ================================================================== --- src/OFURL.m +++ src/OFURL.m @@ -478,11 +478,11 @@ - (void)setFragment: (OFString*)fragment_ { OF_SETTER(fragment, fragment_, YES, YES) } -- (OFString*)description +- (OFString*)string { OFMutableString *ret = [OFMutableString stringWithFormat: @"%@://", scheme]; BOOL needPort = YES; @@ -522,6 +522,11 @@ * would create a real copy each time -[copy] is called. */ ret->isa = [OFString class]; return ret; } + +- (OFString*)description +{ + return [self string]; +} @end