* @file FBaseString.cpp
* @brief This is the implementation for String class.
*/
-
#include <wchar.h>
#include <math.h>
#include <stdlib.h>
#include "FBase_String.h"
#include "FBaseUtil_IcuConverter.h"
-
namespace Tizen { namespace Base
{
result
String::SetCharAt(wchar_t ch, int indexAt)
{
- SysTryReturn(NID_BASE,indexAt >= 0 && indexAt < __length, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
+ SysTryReturn(NID_BASE, indexAt >= 0 && indexAt < __length, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
"[%s] The indexAt(%d) MUST be greater than or equal to 0, and less then the length of this string(%d).",
GetErrorMessage(E_OUT_OF_RANGE), indexAt, __length);
SysTryReturn(NID_BASE, startIndex >= 0 && startIndex < __length, false, E_OUT_OF_RANGE,
"[%s] The startIndex(%d) MUST be greater than or equal to 0, and less than the length of this string(%d).",
GetErrorMessage(E_OUT_OF_RANGE), startIndex, __length);
- SysTryReturn(NID_BASE, str.__length > 0, false, E_INVALID_ARG,
+ SysTryReturn(NID_BASE, str.__length > 0, false, E_INVALID_ARG,
"[%s] Invalid argument is used. The length of str(%d) MUST be greater than 0.",
GetErrorMessage(E_INVALID_ARG), str.__length);
bool trimRight = lastIndex < __length;
bool trimLeft = startIndex > 0;
- if (!trimRight && !trimLeft) // nothing to trim
+ if (!trimRight && !trimLeft) // nothing to trim
{
return;
}
capacity = minCapacity;
}
- std::unique_ptr<wchar_t []> pNewValue(new (std::nothrow) wchar_t[capacity + 1]); // + 1 for null character
+ std::unique_ptr< wchar_t[] > pNewValue(new (std::nothrow) wchar_t[capacity + 1]); // + 1 for null character
SysTryReturn(NID_BASE, pNewValue != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
GetErrorMessage(E_OUT_OF_MEMORY));