@@ -139,11 +139,16 @@ + (instancetype)stringWithUTF8String: (const char *)UTF8String length: (size_t)UTF8StringLength; /*! * @brief Creates a new OFString from a UTF-8 encoded C string without copying - * the string. + * the string, if possible. + * + * If initialization fails for whatever reason, the passed C string is free'd + * if `freeWhenDone` is true. + * + * @note OFMutableString always creates a copy! * * @param UTF8String A UTF-8 encoded C string to initialize the OFString with * @param freeWhenDone Whether to free the C string when the OFString gets * deallocated * @return A new autoreleased OFString @@ -380,13 +385,16 @@ - initWithUTF8String: (const char *)UTF8String length: (size_t)UTF8StringLength; /*! * @brief Initializes an already allocated OFString from an UTF-8 encoded C - * string without copying it, if possible. + * string without copying the string, if possible. * - * @note Mutable versions always create a copy! + * If initialization fails for whatever reason, the passed C string is free'd + * if `freeWhenDone` is true. + * + * @note OFMutableString always creates a copy! * * @param UTF8String A UTF-8 encoded C string to initialize the OFString with * @param freeWhenDone Whether to free the C string when it is not needed * anymore * @return An initialized OFString