[2.2.1] Modify doxygen example of Encode/DecodeBase64StringN
[platform/framework/native/appfw.git] / inc / FBaseUtilStringUtil.h
index f4e0de4..128cdd3 100644 (file)
@@ -33,7 +33,7 @@ namespace Tizen { namespace Base { namespace Utility
 {
 /**
  * @class      StringUtil
- * @brief      This class provides various utility methods for String.
+ * @brief      This class provides various utility methods for %String.
  *
  * @since 2.0
  *
@@ -272,7 +272,7 @@ public:
 
        /**
         * Decodes a string consisting of base 64 digits to a ByteBuffer. @n
-        * The buffer's limit is the length of the string plus one and the starting position is @c 0.
+        * The ByteBuffer's limit is the length of the decoded multibyte string and the starting position is @c 0.
         *
         * @since 2.0
         *
@@ -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
         */
@@ -330,10 +329,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