@@ -1121,10 +1121,18 @@ * @return The string in UTF-32 encoding with the specified byte order */ - (const char32_t *)UTF32StringWithByteOrder: (of_byte_order_t)byteOrder OF_RETURNS_INNER_POINTER; +/*! + * @brief Returns the string as OFData with the specified encoding. + * + * @param encoding The encoding to use for the returned OFData + * @return The string as OFData with the specified encoding + */ +- (OFData *)dataWithEncoding: (of_string_encoding_t)encoding; + #ifdef OF_HAVE_UNICODE_TABLES /*! * @brief Returns the string in Unicode Normalization Form D (NFD). * * @return The string in Unicode Normalization Form D (NFD)