X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFBaseUtilStringUtil.h;h=31d7dd8ea81590e51d0bb8fdbae6f8a954e43b8c;hb=07a771d39ebf4c7f26a04aeb3e06f9d7eb1c6dc2;hp=f6ff57346a4ef7cc2b757530a675a693de03dad6;hpb=8c56709719adac754c76dbcb78f06d4915ceada9;p=platform%2Fframework%2Fnative%2Fappfw.git
diff --git a/inc/FBaseUtilStringUtil.h b/inc/FBaseUtilStringUtil.h
index f6ff573..31d7dd8 100644
--- a/inc/FBaseUtilStringUtil.h
+++ b/inc/FBaseUtilStringUtil.h
@@ -33,11 +33,11 @@ namespace Tizen { namespace Base { namespace Utility
{
/**
* @class StringUtil
- * @brief This class provides various utility methods for %String.
+ * @brief This class provides utility methods for %String operations.
*
* @since 2.0
*
- * The %StringUtil class provides various utility methods for String.
+ * The %StringUtil class provides utility methods for String operations.
*
* For more information on the class features, see Utility.
*
@@ -81,17 +81,18 @@ public:
* Converts an McharBuffer to a null-terminated string. @n
* The position of the buffer is not changed.
*
- * @brief [Deprecated]
- * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
- * Instead of using this method, use the WcharBufferToString(const WcharBuffer& mb, String& str) method.
- * @since 2.0
+ * @brief [Deprecated]
+ * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
+ * Instead of using this method, use the WcharBufferToString(const WcharBuffer& mb, String& str) method.
+ * @since 2.0
*
* @return An error code
- * @param[in] mb An instance of McharBuffer
- * @param[out] str The current position
+ * @param[in] mb An instance of McharBuffer
+ * @param[out] str The null-terminated string
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * @c null does not exist between the position and limit of buffer.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - @c null does not exist between the position and limit of buffer.
* @endif
*/
static result MbToString(const McharBuffer& mb, String& str);
@@ -100,14 +101,15 @@ public:
* Converts an WcharBuffer to a null-terminated string. @n
* The position of the buffer is not changed.
*
- * @since 2.0
+ * @since 2.0
*
* @return An error code
* @param[in] wb An instance of WcharBuffer
- * @param[out] str The current position
+ * @param[out] str The null-terminated string
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * @c null does not exist between the position and limit of buffer.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - @c null does not exist between the position and limit of buffer.
*/
static result WcharBufferToString(const WcharBuffer& wb, String& str);
@@ -116,10 +118,10 @@ public:
* Gets a new McharBuffer from the specified string. @n
* The buffer's limit is the length of the string plus one and the starting position is @c 0.
*
- * @brief [Deprecated]
- * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
- * Instead of using this method, use the StringToWcharBufferN(const String& str) method.
- * @since 2.0
+ * @brief [Deprecated]
+ * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
+ * Instead of using this method, use the StringToWcharBufferN(const String& str) method.
+ * @since 2.0
*
* @return A pointer to the McharBuffer instance from the specified string, @n
* else @c null if an exception occurs
@@ -135,7 +137,7 @@ public:
* Gets a new WcharBuffer from the specified string. @n
* The buffer's limit is the length of the string plus one and the starting position is @c 0.
*
- * @since 2.0
+ * @since 2.0
*
* @return A pointer to the WcharBuffer instance from the specified string, @n
* else @c null if an exception occurs
@@ -151,10 +153,10 @@ public:
* Gets a new McharBuffer from a substring of the specified string. @n
* The buffer's limit is the length of the string plus one and the starting position is @c 0.
*
- * @brief [Deprecated]
- * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
- * Instead of using this method, use the StringToWcharBufferN(const String& str, int index, int length) method.
- * @since 2.0
+ * @brief [Deprecated]
+ * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
+ * Instead of using this method, use the StringToWcharBufferN(const String& str, int index, int length) method.
+ * @since 2.0
*
* @return A pointer to the McharBuffer instance from the substring of the specified string, @n
* else @c null if an exception occurs
@@ -193,13 +195,13 @@ public:
/**
* @if OSPDEPREC
- * Gets the string length in the McharBuffer. @n
+ * Gets the string length in the specified McharBuffer. @n
* The string length is the length from the current position of the %McharBuffer to the @c null character.
* The position of the buffer is not changed.
*
- * @brief [Deprecated]
- * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
- * Instead of using this method, use the GetStringLengthInWcharBuffer(const WcharBuffer& wb) method.
+ * @brief [Deprecated]
+ * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
+ * Instead of using this method, use the GetStringLengthInWcharBuffer(const WcharBuffer& wb) method.
*
* @since 2.0
*
@@ -212,7 +214,7 @@ public:
static int GetStringLengthInMb(const McharBuffer& mb);
/**
- * Gets the string length in the WcharBuffer. @n
+ * Gets the string length in the specified WcharBuffer. @n
* The string length is the length from the current position of the %WcharBuffer to the @c null character.
* The position of the buffer is not changed.
*
@@ -233,12 +235,10 @@ public:
*
* @return A pointer to the ByteBuffer instance encoded from the specified string, @n
* else @c null if an exception occurs
- * @param[in] unicodeString A string to encode
+ * @param[in] unicodeString The string to encode
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see Tizen::Base::ByteBuffer
- * @see Tizen::Base::String
*/
static ByteBuffer* StringToUtf8N(const String& unicodeString);
@@ -249,7 +249,7 @@ public:
* @since 2.0
*
* @return An error code
- * @param[in] pUtf8String A pointer to a String instance containing UTF-8 codes
+ * @param[in] pUtf8String A pointer to the String instance containing UTF-8 codes
* @param[out] unicodeString A string containing Unicode characters
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c pUtf8String is a @c null reference.
@@ -278,7 +278,7 @@ public:
*
* @return A pointer to the ByteBuffer instance decoded from the specified string, @n
* else @c null if an exception occurs
- * @param[in] base64String A string to decode
+ * @param[in] base64String The string to decode
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
* The specified @c base64String is not a valid Base64 string.
@@ -293,16 +293,15 @@ public:
*
* String encodedStr;
* ByteBuffer buffer;
- * buffer.Construct(size + 1);
+ * buffer.Construct(size);
*
- * buffer.SetArray((byte*)pChar, 0, size);
- * buffer.SetByte('\0');
+ * buffer.SetArray(reinterpret_cast< const byte* >(pChar), 0, size);
* buffer.Flip();
*
* StringUtil::EncodeToBase64String(buffer, encodedStr);
*
* // Decodes a String consisting of base 64 digits to a ByteBuffer
- * ByteBuffer* pDecodedBuffer = StringUtil::DecodeBase64StringN(encodedStr);
+ * std::unique_ptr< ByteBuffer > pDecodedBuffer(StringUtil::DecodeBase64StringN(encodedStr));
*
* @endcode
*/
@@ -315,11 +314,12 @@ public:
* @since 2.0
*
* @return An error code
- * @param[in] buffer An instance of ByteBuffer to encode
- * @param[out] encodedString An instance of String consisting of base 64 characters
+ * @param[in] buffer An instance of ByteBuffer to encode
+ * @param[out] encodedString An instance of String consisting of base 64 characters
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the @c buffer is empty.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The @c buffer is empty.
*
* The following example demonstrates how to use the %EncodeToBase64String() method.
*
@@ -330,10 +330,9 @@ public:
*
* String encodedStr;
* ByteBuffer buffer;
- * buffer.Construct(size + 1);
+ * buffer.Construct(size);
*
- * buffer.SetArray((byte*)pChar, 0, size);
- * buffer.SetByte('\0');
+ * buffer.SetArray(reinterpret_cast< const byte* >(pChar), 0, size);
* buffer.Flip();
*
* // Encodes a ByteBuffer into a String consisting of base 64 characters