@@ -7,21 +7,19 @@ * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ -#import - #import "OFObject.h" /** * A class for storing and modifying strings. */ @interface OFString: OFObject { - wchar_t *string; - size_t length; + char *string; + size_t length; } /** * Creates a new OFString. * @@ -35,18 +33,10 @@ * \param str A C string to initialize the OFString with * \return A new OFString */ + newFromCString: (const char*)str; -/** - * Creates a new OFString from a wide C string. - * - * \param str A wide C string to initialize the OFString with - * \return A new OFString - */ -+ newFromWideCString: (const wchar_t*)str; - /** * Initializes an already allocated OFString. * * \return An initialized OFString */ @@ -58,34 +48,20 @@ * \param str A C string to initialize the OFString with * \return An initialized OFString */ - initFromCString: (const char*)str; -/** - * Initializes an already allocated OFString from a wide C string. - * - * \param str A wide C string to initialize the OFString with - * \return An initialized OFString - */ -- initFromWideCString: (const wchar_t*)str; - /** * \return The OFString as a wide C string */ -- (const wchar_t*)wideCString; +- (const char*)cString; /** * \return The length of the OFString */ - (size_t)length; -/** - * \return The OFString as a C string, if possible (if not, returns NULL). - * If not needed anymore, it is usefull to call freeMem:. - */ -- (char*)getCString; - /** * Clones the OFString, creating a new one. * * \return A copy of the OFString */ @@ -119,17 +95,10 @@ * * \param str A C string to append */ - appendCString: (const char*)str; -/** - * Append a wide C string to the OFString. - * - * \param str A wide C string to append - */ -- appendWideCString: (const wchar_t*)str; - /** * Reverse the OFString. */ - reverse;