@@ -542,10 +542,18 @@ * * \return The OFString as a UTF-8 encoded C string */ - (const char*)cString; +/** + * \brief Returns the OFString as a C string in the specified encoding. + * + * \param encoding The encoding for the C string + * \return The OFString as a C string in the specified encoding + */ +- (const char*)cStringWithEncoding: (of_string_encoding_t)encoding;; + /** * \brief Returns the length of the string in Unicode characters. * * \return The length of the string in Unicode characters */ @@ -556,10 +564,19 @@ * * \return The length of the string which cString would return */ - (size_t)cStringLength; +/** + * \brief Returns the number of bytes the string needs in the specified + * encoding. + * + * \param encoding The encoding for the string + * \return The number of bytes the string needs in the specified encoding. + */ +- (size_t)cStringLengthWithEncoding: (of_string_encoding_t)encoding; + /** * \brief Compares the OFString to another OFString without caring about the * case. * * \param otherString A string to compare with