Index: src/OFMutableString.h ================================================================== --- src/OFMutableString.h +++ src/OFMutableString.h @@ -21,17 +21,10 @@ /** * \brief A class for storing and modifying strings. */ @interface OFMutableString: OFString -/** - * \brief Sets the OFMutableString to the specified UTF-8 encoded C string. - * - * \param newCString A UTF-8 encoded C string to set the OFMutableString to. - */ -- (void)setToCString: (const char*)newCString; - /** * \brief Appends a UTF-8 encoded C string to the OFMutableString. * * \param cString A UTF-8 encoded C string to append */ Index: src/OFMutableString.m ================================================================== --- src/OFMutableString.m +++ src/OFMutableString.m @@ -136,41 +136,10 @@ * Even though cStringLength can change, length cannot, therefore no * need to change it. */ } -- (void)setToCString: (const char*)newCString -{ - size_t newCStringLength = strlen(newCString); - size_t newLength; - - if (newCStringLength >= 3 && !memcmp(newCString, "\xEF\xBB\xBF", 3)) { - newCString += 3; - newCStringLength -= 3; - } - - switch (of_string_check_utf8(newCString, newCStringLength, - &newLength)) { - case 0: - s->isUTF8 = NO; - break; - case 1: - s->isUTF8 = YES; - break; - case -1: - @throw [OFInvalidEncodingException newWithClass: isa]; - } - - [self freeMemory: s->cString]; - - s->cStringLength = newCStringLength; - s->length = newLength; - - s->cString = [self allocMemoryWithSize: newCStringLength + 1]; - memcpy(s->cString, newCString, newCStringLength + 1); -} - - (void)appendCString: (const char*)cString { size_t cStringLength = strlen(cString); size_t length;