@@ -86,40 +86,40 @@ /** * \brief Creates a new OFString. * * \return A new, autoreleased OFString */ -+ string; ++ (instancetype)string; /** * \brief Creates a new OFString from a UTF-8 encoded C string. * * \param UTF8String A UTF-8 encoded C string to initialize the OFString with * \return A new autoreleased OFString */ -+ stringWithUTF8String: (const char*)UTF8String; ++ (instancetype)stringWithUTF8String: (const char*)UTF8String; /** * \brief Creates a new OFString from a UTF-8 encoded C string with the * specified length. * * \param UTF8String A UTF-8 encoded C string to initialize the OFString with * \param UTF8StringLength The length of the UTF-8 encoded C string * \return A new autoreleased OFString */ -+ stringWithUTF8String: (const char*)UTF8String - length: (size_t)UTF8StringLength; ++ (instancetype)stringWithUTF8String: (const char*)UTF8String + length: (size_t)UTF8StringLength; /** * \brief Creates a new OFString from a C string with the specified encoding. * * \param string A C string to initialize the OFString with * \param encoding The encoding of the C string * \return A new autoreleased OFString */ -+ stringWithCString: (const char*)cString - encoding: (of_string_encoding_t)encoding; ++ (instancetype)stringWithCString: (const char*)cString + encoding: (of_string_encoding_t)encoding; /** * \brief Creates a new OFString from a C string with the specified encoding * and length. * @@ -126,51 +126,51 @@ * \param cString A C string to initialize the OFString with * \param encoding The encoding of the C string * \param cStringLength The length of the C string * \return A new autoreleased OFString */ -+ stringWithCString: (const char*)cString - encoding: (of_string_encoding_t)encoding - length: (size_t)cStringLength; ++ (instancetype)stringWithCString: (const char*)cString + encoding: (of_string_encoding_t)encoding + length: (size_t)cStringLength; /** * \brief Creates a new OFString from another string. * * \param string A string to initialize the OFString with * \return A new autoreleased OFString */ -+ stringWithString: (OFString*)string; ++ (instancetype)stringWithString: (OFString*)string; /** * \brief Creates a new OFString from a unicode string. * * \param string The unicode string * \return A new autoreleased OFString */ -+ stringWithUnicodeString: (const of_unichar_t*)string; ++ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string; /** * \brief 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: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder; ++ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string + byteOrder: (of_endianess_t)byteOrder; /** * \brief 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 * \return A new autoreleased OFString */ -+ stringWithUnicodeString: (const of_unichar_t*)string - length: (size_t)length; ++ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string + 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. * @@ -177,43 +177,43 @@ * \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: (const of_unichar_t*)string - byteOrder: (of_endianess_t)byteOrder - length: (size_t)length; ++ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string + byteOrder: (of_endianess_t)byteOrder + length: (size_t)length; /** * \brief Creates a new OFString from a UTF-16 encoded string. * * \param string The UTF-16 string * \return A new autoreleased OFString */ -+ stringWithUTF16String: (const uint16_t*)string; ++ (instancetype)stringWithUTF16String: (const uint16_t*)string; /** * \brief 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: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder; ++ (instancetype)stringWithUTF16String: (const uint16_t*)string + byteOrder: (of_endianess_t)byteOrder; /** * \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 * \return A new autoreleased OFString */ -+ stringWithUTF16String: (const uint16_t*)string - length: (size_t)length; ++ (instancetype)stringWithUTF16String: (const uint16_t*)string + length: (size_t)length; /** * \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. @@ -221,13 +221,13 @@ * \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: (const uint16_t*)string - byteOrder: (of_endianess_t)byteOrder - length: (size_t)length; ++ (instancetype)stringWithUTF16String: (const uint16_t*)string + byteOrder: (of_endianess_t)byteOrder + length: (size_t)length; /** * \brief Creates a new OFString from a format string. * * See printf for the format syntax. As an addition, %@ is available as format @@ -234,39 +234,39 @@ * specifier for objects. * * \param format A string used as format to initialize the OFString * \return A new autoreleased OFString */ -+ stringWithFormat: (OFConstantString*)format, ...; ++ (instancetype)stringWithFormat: (OFConstantString*)format, ...; /** * \brief Creates a new OFString containing the constructed specified path. * * \param firstComponent The first component of the path * \return A new autoreleased OFString */ -+ stringWithPath: (OFString*)firstComponent, ...; ++ (instancetype)stringWithPath: (OFString*)firstComponent, ...; /** * \brief Creates a new OFString with the contents of the specified UTF-8 * encoded file. * * \param path The path to the file * \return A new autoreleased OFString */ -+ stringWithContentsOfFile: (OFString*)path; ++ (instancetype)stringWithContentsOfFile: (OFString*)path; /** * \brief Creates a new OFString with the contents of the specified file in the * specified encoding. * * \param path The path to the file * \param encoding The encoding of the file * \return A new autoreleased OFString */ -+ stringWithContentsOfFile: (OFString*)path - encoding: (of_string_encoding_t)encoding; ++ (instancetype)stringWithContentsOfFile: (OFString*)path + encoding: (of_string_encoding_t)encoding; /** * \brief Creates a new OFString with the contents of the specified URL. * * If the URL's scheme is file, it tries UTF-8 encoding. @@ -276,22 +276,22 @@ * UTF-8. * * \param URL The URL to the contents for the string * \return A new autoreleased OFString */ -+ stringWithContentsOfURL: (OFURL*)URL; ++ (instancetype)stringWithContentsOfURL: (OFURL*)URL; /** * \brief Creates a new OFString with the contents of the specified URL in the * specified encoding. * * \param URL The URL to the contents for the string * \param encoding The encoding to assume * \return A new autoreleased OFString */ -+ stringWithContentsOfURL: (OFURL*)URL - encoding: (of_string_encoding_t)encoding; ++ (instancetype)stringWithContentsOfURL: (OFURL*)URL + encoding: (of_string_encoding_t)encoding; /** * \brief Initializes an already allocated OFString from a UTF-8 encoded C * string. *