Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -632,14 +632,22 @@ /** * \brief Creates a new string by appending another string. * * \param string The string to append - * \return A new autoreleased OFString with the specified string appended + * \return A new, autoreleased OFString with the specified string appended */ - (OFString*)stringByAppendingString: (OFString*)string; +/** + * \brief Creates a new string by appending a path component. + * + * \param component The path component to append + * \return A new, autoreleased OFString with the path component appended + */ +- (OFString*)stringByAppendingPathComponent: (OFString*)component; + /** * \brief Creates a new string by prepending another string. * * \param string The string to prepend * \return A new autoreleased OFString with the specified string prepended Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -1411,10 +1411,15 @@ [new makeImmutable]; return new; } + +- (OFString*)stringByAppendingPathComponent: (OFString*)component +{ + return [OFString stringWithPath: self, component, nil]; +} - (OFString*)stringByPrependingString: (OFString*)string { OFMutableString *new = [[string mutableCopy] autorelease];