@@ -28,10 +28,14 @@ #import "OFEnumerator.h" #import "OFSerialization.h" #import "OFJSONRepresentation.h" @class OFString; + +enum { + OF_SORT_OPTIONS_DESCENDING = 1 +}; #ifdef OF_HAVE_BLOCKS typedef void (^of_array_enumeration_block_t)(id object, size_t index, BOOL *stop); typedef BOOL (^of_array_filter_block_t)(id odject, size_t index); @@ -263,10 +267,22 @@ * * @return A sorted copy of the array */ - (OFArray*)sortedArray; +/*! + * @brief Returns a sorted copy of the array. + * + * @param options The options to use when sorting the array.@n + * Possible values are: + * Value | Description + * ---------------------------|------------------------- + * OF_SORT_OPTIONS_DESCENDING | Sort in descending order + * @return A sorted copy of the array + */ +- (OFArray*)sortedArrayWithOptions: (int)options; + /*! * @brief Returns a copy of the array with the order reversed. * * @return A copy of the array with the order reversed */