Lines Matching refs:arr
120 UChar *arr = nullptr;
122 arr = new (std::nothrow) UChar[limit + 1];
123 if (arr == nullptr) {
124 HILOG_ERROR("decode arr is nullptr");
127 if (memset_s(arr, len + sizeof(UChar), 0, len + sizeof(UChar)) != EOK) {
128 HILOG_ERROR("decode arr memset_s failed");
129 FreedMemory(arr);
136 UChar *target = arr;
137 size_t tarStartPos = reinterpret_cast<uintptr_t>(arr);
146 SetBomFlag(arr, codeFlag, decArr, resultLength, omitInitialBom);
147 UChar *arrDat = arr;
149 arrDat = &arr[2]; // 2: Obtains the 2 value of the array.
154 FreedMemory(arr);
205 UChar *arr = nullptr;
207 arr = new (std::nothrow) UChar[limit + 1]{0};
208 if (arr == nullptr) {
209 HILOG_DEBUG("arr is nullptr");
216 UChar *target = arr;
220 FreedMemory(arr);
225 size_t resultLen = target - arr;
227 SetIgnoreBOM(arr, resultLen, omitInitialBom);
228 UChar *arrDat = arr;
230 arrDat = &arr[1];
234 FreedMemory(arr);
267 void TextDecoder::SetBomFlag(const UChar *arr, const UErrorCode codeFlag, const DecodeArr decArr,
270 if (arr == nullptr) {
277 bomFlag = (arr[0] == 0xFEFF) ? true : false;
284 void TextDecoder::SetIgnoreBOM(const UChar *arr, size_t resultLen, bool &bomFlag)
296 bomFlag = (arr[0] == 0xFEFF) ? true : false;