@@ -123,10 +123,21 @@ * \param string The unicode string * \return A new autoreleased OFString */ + stringWithUnicodeString: (of_unichar_t*)string; +/** + * Creates a new OFString from a unicode string, assuming the specified byte + * order if no BOM is found. + * + * \param string The unicode string + * \param byteOrder The byte order to assume if there is no BOM + * \return A new autoreleased OFString + */ ++ stringWithUnicodeString: (of_unichar_t*)string + byteOrder: (of_endianess_t)byteOrder; + /** * Creates a new OFString from a unicode string with the specified length. * * \param string The unicode string * \param length The length of the unicode string @@ -133,27 +144,64 @@ * \return A new autoreleased OFString */ + stringWithUnicodeString: (of_unichar_t*)string length: (size_t)length; +/** + * Creates a new OFString from a unicode string with the specified length, + * assuming the specified byte order if no BOM is found. + * + * \param string The unicode string + * \param byteOrder The byte order to assume if there is no BOM + * \param length The length of the unicode string + * \return A new autoreleased OFString + */ ++ stringWithUnicodeString: (of_unichar_t*)string + byteOrder: (of_endianess_t)byteOrder + length: (size_t)length; + /** * Creates a new OFString from a UTF-16 encoded string. * * \param string The UTF-16 string * \return A new autoreleased OFString */ + stringWithUTF16String: (uint16_t*)string; +/** + * Creates a new OFString from a UTF-16 encoded string, assuming the specified + * byte order if no BOM is found. + * + * \param string The UTF-16 string + * \param byteOrder The byte order to assume if there is no BOM + * \return A new autoreleased OFString + */ ++ stringWithUTF16String: (uint16_t*)string + byteOrder: (of_endianess_t)byteOrder; + +/** + * 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 + * \return A new autoreleased OFString + */ ++ stringWithUTF16String: (uint16_t*)string + length: (size_t)length; + /** * Creates a new OFString from a UTF-16 encoded string with the specified - * length. + * length, assuming the specified byte order if no BOM is found. * * \param string The UTF-16 string + * \param byteOrder The byte order to assume if there is no BOM * \param length The length of the unicode string * \return A new autoreleased OFString */ + stringWithUTF16String: (uint16_t*)string + byteOrder: (of_endianess_t)byteOrder length: (size_t)length; /** * Creates a new OFString from a format string. * See printf for the format syntax. @@ -272,10 +320,21 @@ * \param string The unicode string * \return An initialized OFString */ - initWithUnicodeString: (of_unichar_t*)string; +/** + * Initializes an already allocated OFString with a unicode string, assuming the + * specified byte order if no BOM is found. + * + * \param string The unicode string + * \param byteOrder The byte order to assume if there is no BOM + * \return An initialized OFString + */ +- initWithUnicodeString: (of_unichar_t*)string + byteOrder: (of_endianess_t)byteOrder; + /** * Initializes an already allocated OFString with a unicode string with the * specified length. * * \param string The unicode string @@ -283,18 +342,42 @@ * \return An initialized OFString */ - initWithUnicodeString: (of_unichar_t*)string length: (size_t)length; +/** + * Initializes an already allocated OFString with a unicode string with the + * specified length, assuming the specified byte order if no BOM is found. + * + * \param string The unicode string + * \param byteOrder The byte order to assume if there is no BOM + * \param length The length of the unicode string + * \return An initialized OFString + */ +- initWithUnicodeString: (of_unichar_t*)string + byteOrder: (of_endianess_t)byteOrder + length: (size_t)length; + /** * Initializes an already allocated OFString with a UTF-16 string. * * \param string The UTF-16 string * \return An initialized OFString */ - initWithUTF16String: (uint16_t*)string; +/** + * Initializes an already allocated OFString with a UTF-16 string, assuming the + * specified byte order if no BOM is found. + * + * \param string The UTF-16 string + * \param byteOrder The byte order to assume if there is no BOM + * \return An initialized OFString + */ +- initWithUTF16String: (uint16_t*)string + byteOrder: (of_endianess_t)byteOrder; + /** * Initializes an already allocated OFString with a UTF-16 string with the * specified length. * * \param string The UTF-16 string @@ -302,10 +385,23 @@ * \return An initialized OFString */ - initWithUTF16String: (uint16_t*)string length: (size_t)length; +/** + * Initializes an already allocated OFString with a UTF-16 string with the + * specified length, assuming the specified byte order if no BOM is found. + * + * \param string The UTF-16 string + * \param byteOrder The byte order to assume if there is no BOM + * \param length The length of the UTF-16 string + * \return An initialized OFString + */ +- initWithUTF16String: (uint16_t*)string + byteOrder: (of_endianess_t)byteOrder + length: (size_t)length; + /** * Initializes an already allocated OFString with a format string. * See printf for the format syntax. * * \param format A string used as format to initialize the OFString