/foundation/arkui/ace_engine_lite/frameworks/src/core/base/ |
H A D | number_parser.cpp | 25 * @param strLength the given percent string length 30 bool NumberParser::ParsePercentValue(const char *percentStr, uint16_t strLength, float &outValue) in ParsePercentValue() argument 34 if (!(IsValidString(percentStr, strLength)) || (strLength < minLength)) { in ParsePercentValue() 39 uint16_t ensuredStrLength = (strLength > originalStrLen) ? originalStrLen : strLength; in ParsePercentValue() 73 * @param strLength the given string's length 76 bool NumberParser::IsValidString(const char *str, uint16_t strLength) in IsValidString() argument 78 return ((str != nullptr) && (strLength != 0)); in IsValidString()
|
H A D | number_parser.h | 36 * @param strLength the given percent string length 41 static bool ParsePercentValue(const char *percentStr, uint16_t strLength, float &outValue); 47 * @param strLength the given string's length 50 static bool IsValidString(const char *str, uint16_t strLength);
|
H A D | js_fwk_common.cpp | 132 char *MallocStringOf(jerry_value_t source, uint16_t *strLength) in MallocStringOf() argument 134 if ((IS_UNDEFINED(source)) || (strLength == nullptr)) { in MallocStringOf() 135 HILOG_ERROR(HILOG_MODULE_ACE, "Invalid input: source is undefined or strLength is nullptr"); in MallocStringOf() 139 *strLength = 0; in MallocStringOf() 186 *strLength = length; in MallocStringOf() 1247 uint16_t strLength = 0; in ParseKeyIdFromJSString() local 1248 char *keyStr = MallocStringOf(str, &strLength); in ParseKeyIdFromJSString() 1250 if (strLength != 0) { in ParseKeyIdFromJSString() 1251 keyId = KeyParser::ParseKeyId(keyStr, strLength); in ParseKeyIdFromJSString()
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/components/test/unittest/common/ |
H A D | percent_tdd_test.cpp | 151 uint16_t strLength = 5; in HWTEST_F() local 156 bool result = NumberParser::ParsePercentValue(nullptr, strLength, percentValue); in HWTEST_F() 169 uint16_t strLength = 1; in HWTEST_F() local 175 bool result = NumberParser::ParsePercentValue(strBuffer, strLength, percentValue); in HWTEST_F() 188 uint16_t strLength = 4; in HWTEST_F() local 194 bool result = NumberParser::ParsePercentValue(strBuffer, strLength, percentValue); in HWTEST_F() 209 uint16_t strLength = 7; in HWTEST_F() local 215 bool result = NumberParser::ParsePercentValue(strBuffer, strLength, percentValue); in HWTEST_F() 228 uint16_t strLength = 20; in HWTEST_F() local 234 bool result = NumberParser::ParsePercentValue(strBuffer, strLength, percentValu in HWTEST_F() 247 uint16_t strLength = 4; HWTEST_F() local 266 uint16_t strLength = 4; HWTEST_F() local 287 uint16_t strLength = 6; HWTEST_F() local 306 uint16_t strLength = 100; HWTEST_F() local 329 uint16_t strLength = 16; HWTEST_F() local 347 uint16_t strLength = 16; HWTEST_F() local [all...] |
/foundation/ability/form_fwk/services/src/ |
H A D | form_util.cpp | 259 size_t strLength = strInfo.size(); in ConvertStringToInt64() local 260 if (strLength == ZERO_VALUE) { in ConvertStringToInt64() 269 if (strLength < INT_64_LENGTH) { in ConvertStringToInt64() 274 if (strLength == INT_64_LENGTH && maxSubValue < BASE_NUMBER) { in ConvertStringToInt64() 280 if (strLength == INT_64_LENGTH && subValue <= (INT64_MAX - HEAD_BIT_NUM)) { in ConvertStringToInt64() 286 if (strLength < INT_64_LENGTH + 1) { // The minimum value: -9223372036854775808 in ConvertStringToInt64() 290 if (strLength == INT_64_LENGTH + 1) { in ConvertStringToInt64()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/ |
H A D | skia_font.cpp | 293 size_t strLength = 0; in GetTextPath() local 296 strLength = std::char_traits<char>::length(static_cast<const char*>(text)) * sizeof(char); in GetTextPath() 300 strLength = std::char_traits<char16_t>::length(static_cast<const char16_t*>(text)) * sizeof(char16_t); in GetTextPath() 304 strLength = std::char_traits<char32_t>::length(static_cast<const char32_t*>(text)) * sizeof(char32_t); in GetTextPath() 308 strLength = length; in GetTextPath() 314 SkTextUtils::GetPath(text, std::min(strLength, length), static_cast<SkTextEncoding>(encoding), x, y, skFont_, in GetTextPath()
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/stylemgr/ |
H A D | app_style_item.cpp | 136 uint16_t strLength = 0; in CreateStyleItem() local 137 strValueBuffer = MallocStringOf(stylePropValue, &strLength); in CreateStyleItem() 145 if (NumberParser::ParsePercentValue(strValueBuffer, strLength, percentValue)) { in CreateStyleItem()
|
/foundation/barrierfree/accessibility/services/aams/src/ |
H A D | utils.cpp | 385 int32_t strLength = static_cast<int32_t>(stringIn.size()); in StringToVector() local 388 if (strLength <= 0 || strLength > STRING_LEN_MAX) { in StringToVector() 392 for (int32_t j = 0; j < strLength; j++) { in StringToVector() 414 length = strLength - position[i - 1] - 1; in StringToVector() 419 HILOG_DEBUG("strLength = %{public}d, wrodCount = %{public}d, stringIn : %{public}s", in StringToVector() 420 strLength, wrodCount, stringIn.c_str()); in StringToVector()
|
/foundation/window/window_manager/window_scene/screen_session_manager/src/ |
H A D | screen_setting_helper.cpp | 253 int32_t strLength = dataStr.size(); in SplitString() local 256 for (int32_t currentIdx = 0; currentIdx < strLength; currentIdx++) { in SplitString() 268 currentValue = dataStr.substr(beginIdx, strLength - beginIdx); in SplitString() 284 int32_t strLength = inputString.size(); in GetDataFromString() local 286 for (int32_t currentIdx = 0; currentIdx < strLength; currentIdx++) { in GetDataFromString() 298 std::string dataStr = inputString.substr(beginIdx, strLength - beginIdx); in GetDataFromString()
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/ |
H A D | console_log_impl.cpp | 129 size_t strLength = strlen(str); in LogString() local 130 for (size_t i = 0; i < strLength; i++) { in LogString()
|
H A D | cjson_parser.cpp | 228 uint16_t strLength = 0; // the length of result in ToString() local 232 if ((valueLen > (MAX_VALUE_LEN - 1)) || (strLength > (MAX_VALUE_LEN - 1)) || in ToString() 233 (strLength + valueLen > (MAX_VALUE_LEN - 1))) { in ToString() 238 strLength += valueLen; in ToString() 243 // the strLength is no more than maxValueLen_ - 1 in ToString() 244 strLength++; in ToString() 245 char *result = static_cast<char *>(ace_malloc(strLength)); in ToString() 252 if (strcpy_s(result, strLength, temp[0]) != 0) { in ToString() 259 if (strcat_s(result, strLength, temp[i]) != 0) { in ToString()
|
/foundation/resourceschedule/resource_schedule_service/ressched/interfaces/kits/js/napi/include/ |
H A D | js_napi_utils.h | 141 size_t strLength = 0; in ConvertFromJsValue() local 142 NAPI_CALL_NO_THROW(napi_get_value_string_utf8(env, jsValue, buffer.get(), len + 1, &strLength), false); in ConvertFromJsValue()
|
/foundation/multimedia/audio_framework/services/audio_policy/server/include/service/manager/pnp_server/ |
H A D | audio_socket_thread.h | 36 static bool AudioPnpUeventParse(const char *msg, const ssize_t strLength);
|
/foundation/ability/form_fwk/frameworks/js/napi/formUtil/ |
H A D | napi_form_util.cpp | 246 size_t strLength = strInfo.size(); in ConvertStringToInt64() local 247 if (strLength == ZERO_VALUE) { in ConvertStringToInt64() 256 if (strLength < INT_64_LENGTH) { in ConvertStringToInt64() 261 if (strLength == INT_64_LENGTH && maxSubValue < BASE_NUMBER) { in ConvertStringToInt64() 267 if (strLength == INT_64_LENGTH && subValue <= (INT64_MAX - HEAD_BIT_NUM)) { in ConvertStringToInt64() 273 if (strLength < INT_64_LENGTH + 1) { // The minimum value: -9223372036854775808 in ConvertStringToInt64() 277 if (strLength == INT_64_LENGTH + 1) { in ConvertStringToInt64()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/drawing_ndk/cpp/ |
H A D | test_common.cpp | 178 size_t strLength = 0;
in ConvertStringFromJsValue() local 179 if (napi_get_value_string_utf8(env, jsValue, buffer.get(), len + 1, &strLength) == napi_ok) {
in ConvertStringFromJsValue()
|
/foundation/multimedia/av_codec/services/media_engine/plugins/source/http_source/dash/mpd_parser/ |
H A D | dash_mpd_util.cpp | 136 size_t strLength = strlen("%0"); in GetSubstitutionStr() local 137 str = str.substr(strLength); in GetSubstitutionStr()
|
/foundation/multimedia/audio_framework/services/audio_policy/server/src/service/manager/pnp_server/ |
H A D | audio_socket_thread.cpp | 544 bool AudioSocketThread::AudioPnpUeventParse(const char *msg, const ssize_t strLength) in AudioPnpUeventParse() argument 552 if (strLength > UEVENT_MSG_LEN + 1) { in AudioPnpUeventParse() 553 AUDIO_ERR_LOG("strLength > UEVENT_MSG_LEN + 1"); in AudioPnpUeventParse() 556 AUDIO_DEBUG_LOG("Param strLength: %{public}zu msg:[%{public}s] len:[%{public}zu]", strLength, msg, strlen(msg)); in AudioPnpUeventParse() 557 for (const char *msgTmp = msg; msgTmp < (msg + strLength);) { in AudioPnpUeventParse()
|
/foundation/arkui/napi/test/unittest/ |
H A D | test_napi_ext.cpp | 161 size_t strLength = 0; in HWTEST_F() local 165 ASSERT_CHECK_CALL(napi_get_value_string_utf16(env, result, buffer, bufferSize + 1, &strLength)); in HWTEST_F() 169 ASSERT_EQ(testStrLength, strLength); in HWTEST_F() 175 ASSERT_CHECK_CALL(napi_get_value_string_utf16(env, result, bufferShort, bufferShortSize, &strLength)); in HWTEST_F() 183 ASSERT_EQ(testStrLength, strLength); in HWTEST_F()
|
/foundation/ability/dmsfwk/services/dtbschedmgr/src/continue/ |
H A D | dsched_continue_event.cpp | 92 int32_t strLength = sizeof(strKeys) / sizeof(strKeys[0]); in Unmarshal() local 93 for (int32_t i = 0; i < strLength; i++) { in Unmarshal() 475 int32_t strLength = sizeof(strKeys) / sizeof(strKeys[0]); in UnmarshalCallerInfo() local 476 for (int32_t i = 0; i < strLength; i++) { in UnmarshalCallerInfo()
|
/foundation/arkui/napi/native_engine/ |
H A D | native_engine.cpp | 332 [[maybe_unused]] size_t strLength = 0; in CreateAsyncWork() local 338 strLength = static_cast<size_t>(str->Utf8Length(vm, true) - 1); in CreateAsyncWork() 342 strLength = copied; in CreateAsyncWork() 344 strLength = 0; in CreateAsyncWork()
|
/foundation/communication/nfc/frameworks/js/napi/common/ |
H A D | nfc_napi_common_utils.cpp | 395 uint32_t strLength = srcValue.length(); in ConvertStringToNumberArray() local 396 if (strLength % HEX_BYTE_LEN != 0) { in ConvertStringToNumberArray() 398 strLength++; in ConvertStringToNumberArray() 401 napi_create_array_with_length(env, (strLength / HEX_BYTE_LEN), &result); in ConvertStringToNumberArray() 403 for (uint32_t i = 0; i < strLength; i += HEX_BYTE_LEN) { in ConvertStringToNumberArray()
|
/foundation/ability/ability_runtime/interfaces/inner_api/runtime/include/ |
H A D | js_runtime_utils.h | 178 size_t strLength = 0; in ConvertFromJsValue() local 179 NAPI_CALL_NO_THROW(napi_get_value_string_utf8(env, jsValue, buffer.get(), len + 1, &strLength), false); in ConvertFromJsValue()
|
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/color_manager/color_space_object_convertor/ |
H A D | js_color_space_utils.h | 332 size_t strLength = 0; in ConvertFromJsValue() local 333 if (napi_get_value_string_utf8(env, jsValue, buffer.get(), len + 1, &strLength) == napi_ok) { in ConvertFromJsValue()
|
/foundation/multimedia/audio_framework/test/fuzztest/audiopolicymore_fuzzer/ |
H A D | audio_policy_more_fuzzer.cpp | 466 ssize_t strLength = DEFAULTSTRLENGTH; in AudioPolicyManagerFuzzTest() local 474 AudioSocketThread::AudioPnpUeventParse(msg, strLength); in AudioPolicyManagerFuzzTest()
|
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing/ |
H A D | js_drawing_utils.h | 341 size_t strLength = 0; in ConvertFromJsValue() local 342 if (napi_get_value_string_utf8(env, jsValue, buffer.get(), len + 1, &strLength) == napi_ok) { in ConvertFromJsValue()
|