@@ -12,10 +12,12 @@ #include #import "OFObject.h" #import "OFDataArray.h" +@class OFString; + /** * The OFArray class provides a class for storing objects in an array. */ @interface OFArray: OFObject { @@ -124,10 +126,18 @@ /** * \return The last object of the OFArray or nil */ - (id)lastObject; +/** + * Creates a string by joining all objects of the array. + * + * \param separator The string with which the objects should be joined + * \return A string containing all objects joined by the separator + */ +- (OFString*)componentsJoinedByString: (OFString*)separator; + - addObject: (OFObject*)obj; - addObject: (OFObject*)obj atIndex: (size_t)index; - removeObject: (OFObject*)obj; - removeObjectIdenticalTo: (OFObject*)obj; @@ -136,5 +146,6 @@ - removeNObjects: (size_t)nobjects atIndex: (size_t)index; @end #import "OFMutableArray.h" +#import "OFString.h"