@@ -45,10 +45,20 @@ * \param str A C string to initialize the OFString with * \return A new autoreleased OFString */ + stringWithCString: (const char*)str; +/** + * Creates a new OFString from a C string with the specified length. + * + * \param str A C string to initialize the OFString with + * \param len The length of the string + * \return A new autoreleased OFString + */ ++ stringWithCString: (const char*)str + andLength: (size_t)len; + /** * Creates a new OFString from a format string. * See printf for the format syntax. * * \param fmt A string used as format to initialize the OFString @@ -70,17 +80,28 @@ * \return An initialized OFString */ - init; /** - * Initializes an already allocated OFString with a C string. + * Initializes an already allocated OFString from a C string. * * \param str A C string to initialize the OFString with * \return An initialized OFString */ - initWithCString: (const char*)str; +/** + * Initializes an already allocated OFString from a C string with the specified + * length. + * + * \param str A C string to initialize the OFString with + * \param len The length of the string + * \return An initialized OFString + */ +- initWithCString: (const char*)str + andLength: (size_t)len; + /** * Initializes an already allocated OFString with a format string. * See printf for the format syntax. * * \param fmt A string used as format to initialize the OFString @@ -157,11 +178,15 @@ */ - (OFArray*)splitWithDelimiter: (OFString*)delimiter; - setToCString: (const char*)str; - appendCString: (const char*)str; +- appendCString: (const char*)str + withLength: (size_t)len; - appendCStringWithoutUTF8Checking: (const char*)str; +- appendCStringWithoutUTF8Checking: (const char*)str + andLength: (size_t)len; - appendString: (OFString*)str; - appendWithFormat: (OFString*)fmt, ...; - appendWithFormat: (OFString*)fmt andArguments: (va_list)args; - reverse;