@@ -146,37 +146,24 @@ * @return A new autoreleased OFString */ + (instancetype)stringWithCharacters: (const of_unichar_t*)characters length: (size_t)length; -/*! - * @brief Creates a new OFString from a unicode string with the specified - * length, assuming the specified byte order if no BOM is found. - * - * @param characters An array of unicode characters - * @param length The length of the unicode character array - * @param byteOrder The byte order to assume if there is no BOM - * @return A new autoreleased OFString - */ -+ (instancetype)stringWithCharacters: (const of_unichar_t*)characters - length: (size_t)length - byteOrder: (of_byte_order_t)byteOrder; - /*! * @brief Creates a new OFString from a UTF-16 encoded string. * * @param string The UTF-16 string * @return A new autoreleased OFString */ + (instancetype)stringWithUTF16String: (const uint16_t*)string; /*! - * @brief Creates a new OFString from a UTF-16 encoded string with the specified - * length. + * @brief Creates a new OFString from a UTF-16 encoded string with the + * specified length. * * @param string The UTF-16 string - * @param length The length of the unicode string + * @param length The length of the UTF-16 string * @return A new autoreleased OFString */ + (instancetype)stringWithUTF16String: (const uint16_t*)string length: (size_t)length; @@ -195,11 +182,11 @@ * @brief Creates a new OFString from a UTF-16 encoded string with the * specified length, assuming the specified byte order if no BOM is * found. * * @param string The UTF-16 string - * @param length The length of the unicode string + * @param length The length of the UTF-16 string * @param byteOrder The byte order to assume if there is no BOM * @return A new autoreleased OFString */ + (instancetype)stringWithUTF16String: (const uint16_t*)string length: (size_t)length @@ -211,10 +198,21 @@ * @param string The UTF-32 string * @return A new autoreleased OFString */ + (instancetype)stringWithUTF32String: (const uint32_t*)string; +/*! + * @brief Creates a new OFString from a UTF-32 encoded string with the + * specified length. + * + * @param string The UTF-32 string + * @param length The length of the UTF-32 string + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUTF32String: (const uint32_t*)string + length: (size_t)length; + /*! * @brief Creates a new OFString from a UTF-32 encoded string, assuming the * specified byte order if no BOM is found. * * @param string The UTF-32 string @@ -222,10 +220,24 @@ * @return A new autoreleased OFString */ + (instancetype)stringWithUTF32String: (const uint32_t*)string byteOrder: (of_byte_order_t)byteOrder; +/*! + * @brief Creates a new OFString from a UTF-32 encoded string with the + * specified length, assuming the specified byte order if no BOM is + * found. + * + * @param string The UTF-32 string + * @param length The length of the UTF-32 string + * @param byteOrder The byte order to assume if there is no BOM + * @return A new autoreleased OFString + */ ++ (instancetype)stringWithUTF32String: (const uint32_t*)string + length: (size_t)length + byteOrder: (of_byte_order_t)byteOrder; + /*! * @brief Creates a new OFString from a format string. * * See printf for the format syntax. As an addition, %@ is available as format * specifier for objects. @@ -363,24 +375,10 @@ * @return An initialized OFString */ - initWithCharacters: (const of_unichar_t*)characters length: (size_t)length; -/*! - * @brief Initializes an already allocated OFString with a unicode string with - * the specified length, assuming the specified byte order if no BOM is - * found. - * - * @param characters An array of unicode characters - * @param length The length of the unicode character array - * @param byteOrder The byte order to assume if there is no BOM - * @return An initialized OFString - */ -- initWithCharacters: (const of_unichar_t*)characters - length: (size_t)length - byteOrder: (of_byte_order_t)byteOrder; - /*! * @brief Initializes an already allocated OFString with a UTF-16 string. * * @param string The UTF-16 string * @return An initialized OFString @@ -429,10 +427,21 @@ * @param string The UTF-32 string * @return An initialized OFString */ - initWithUTF32String: (const uint32_t*)string; +/*! + * @brief Initializes an already allocated OFString with a UTF-32 string with + * the specified length + * + * @param string The UTF-32 string + * @param length The length of the UTF-32 string + * @return An initialized OFString + */ +- initWithUTF32String: (const uint32_t*)string + length: (size_t)length; + /*! * @brief Initializes an already allocated OFString with a UTF-32 string, * assuming the specified byte order if no BOM is found. * * @param string The UTF-32 string @@ -440,10 +449,24 @@ * @return An initialized OFString */ - initWithUTF32String: (const uint32_t*)string byteOrder: (of_byte_order_t)byteOrder; +/*! + * @brief Initializes an already allocated OFString with a UTF-32 string with + * the specified length, assuming the specified byte order if no BOM is + * found. + * + * @param string The UTF-32 string + * @param length The length of the UTF-32 string + * @param byteOrder The byte order to assume if there is no BOM + * @return An initialized OFString + */ +- initWithUTF32String: (const uint32_t*)string + length: (size_t)length + byteOrder: (of_byte_order_t)byteOrder; + /*! * @brief Initializes an already allocated OFString with a format string. * * See printf for the format syntax. As an addition, %@ is available as format * specifier for objects.