Home
last modified time | relevance | path

Searched refs:strLength (Results 1 – 25 of 40) sorted by relevance

12

/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/components/test/unittest/common/
H A Dpercent_tdd_test.cpp151 uint16_t strLength = 5; variable
169 uint16_t strLength = 1; variable
188 uint16_t strLength = 4; variable
209 uint16_t strLength = 7; variable
228 uint16_t strLength = 20; variable
247 uint16_t strLength = 4; variable
266 uint16_t strLength = 4; variable
287 uint16_t strLength = 6; variable
306 uint16_t strLength = 100; variable
329 uint16_t strLength = 16; variable
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/base/
H A Dnumber_parser.cpp30 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()
76 bool NumberParser::IsValidString(const char *str, uint16_t strLength) in IsValidString() argument
78 return ((str != nullptr) && (strLength != 0)); in IsValidString()
H A Dnumber_parser.h41 static bool ParsePercentValue(const char *percentStr, uint16_t strLength, float &outValue);
50 static bool IsValidString(const char *str, uint16_t strLength);
H A Djs_fwk_common.cpp132 char *MallocStringOf(jerry_value_t source, uint16_t *strLength) in MallocStringOf() argument
134 if ((IS_UNDEFINED(source)) || (strLength == nullptr)) { in MallocStringOf()
139 *strLength = 0; in MallocStringOf()
186 *strLength = length; in MallocStringOf()
1241 uint16_t strLength = 0; in ParseKeyIdFromJSString() local
1242 char *keyStr = MallocStringOf(str, &strLength); in ParseKeyIdFromJSString()
1244 if (strLength != 0) { in ParseKeyIdFromJSString()
1245 keyId = KeyParser::ParseKeyId(keyStr, strLength); in ParseKeyIdFromJSString()
/ohos5.0/base/startup/appspawn/lite/
H A Dappspawn_message.c74 size_t strLength = strlen(strPtr); in ReadStringItem() local
75 if (strLength > maxLen || strLength < minLen) { in ReadStringItem()
79 char *bufTmp = (char *)malloc(strLength + 1); in ReadStringItem()
84 if (strLength > 0 && memcpy_s(bufTmp, strLength, strPtr, strLength) != EOK) { in ReadStringItem()
90 bufTmp[strLength] = '\0'; in ReadStringItem()
/ohos5.0/base/telephony/sms_mms/frameworks/js/napi/src/
H A Dnapi_send_recv_mms.cpp247 size_t strLength = 0; in GetMmsNameProperty() local
248 napi_get_value_string_utf8(env, mmscValue, strChars, BUFF_LENGTH, &strLength); in GetMmsNameProperty()
249 std::string str8(strChars, strLength); in GetMmsNameProperty()
255 size_t strLength = 0; in GetMmsNameProperty() local
256 napi_get_value_string_utf8(env, dataValue, strChars, BUFF_LENGTH, &strLength); in GetMmsNameProperty()
257 std::string str8(strChars, strLength); in GetMmsNameProperty()
265 size_t strLength = 0; in GetMmsNameProperty() local
266 napi_get_value_string_utf8(env, uaValue, strChars, BUFF_LENGTH, &strLength); in GetMmsNameProperty()
267 std::string str8(strChars, strLength); in GetMmsNameProperty()
273 size_t strLength = 0; in GetMmsNameProperty() local
[all …]
/ohos5.0/foundation/ability/form_fwk/services/src/
H A Dform_util.cpp259 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()
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/stylemgr/
H A Dapp_style_item.cpp136 uint16_t strLength = 0; in CreateStyleItem() local
137 strValueBuffer = MallocStringOf(stylePropValue, &strLength); in CreateStyleItem()
145 if (NumberParser::ParsePercentValue(strValueBuffer, strLength, percentValue)) { in CreateStyleItem()
/ohos5.0/foundation/barrierfree/accessibility/services/aams/src/
H A Dutils.cpp405 int32_t strLength = static_cast<int32_t>(stringIn.size()); in StringToVector() local
408 if (strLength <= 0 || strLength > STRING_LEN_MAX) { in StringToVector()
412 for (int32_t j = 0; j < strLength; j++) { in StringToVector()
434 length = strLength - position[i - 1] - 1; in StringToVector()
440 strLength, wrodCount, stringIn.c_str()); in StringToVector()
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/
H A Dcjson_parser.cpp228 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()
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()
H A Dconsole_log_impl.cpp129 size_t strLength = strlen(str); in LogString() local
130 for (size_t i = 0; i < strLength; i++) { in LogString()
/ohos5.0/docs/zh-cn/application-dev/napi/
H A Duse-napi-about-property.md395 const int32_t strLength = 32;
396 char strKey[strLength] = "";
400 napi_get_value_string_utf8(env, str, strKey, strLength, &keyLength);
451 const int32_t strLength = 32;
452 char strKey[strLength] = "";
456 napi_get_value_string_utf8(env, args[1], strKey, strLength, &keyLength);
517 const int32_t strLength = 32;
518 char strKey[strLength] = "";
522 napi_get_value_string_utf8(env, args[1], strKey, strLength, &keyLength);
/ohos5.0/foundation/ability/form_fwk/frameworks/js/napi/formUtil/
H A Dnapi_form_util.cpp246 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()
/ohos5.0/foundation/resourceschedule/resource_schedule_service/ressched/interfaces/kits/js/napi/include/
H A Djs_napi_utils.h141 size_t strLength = 0; in ConvertFromJsValue() local
142 …_CALL_NO_THROW(napi_get_value_string_utf8(env, jsValue, buffer.get(), len + 1, &strLength), false); in ConvertFromJsValue()
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/drawing_ndk/cpp/
H A Dtest_common.cpp178 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()
/ohos5.0/foundation/arkui/napi/test/unittest/
H A Dtest_napi_ext.cpp161 size_t strLength = 0; variable
165 ASSERT_CHECK_CALL(napi_get_value_string_utf16(env, result, buffer, bufferSize + 1, &strLength));
169 ASSERT_EQ(testStrLength, strLength);
175 …ERT_CHECK_CALL(napi_get_value_string_utf16(env, result, bufferShort, bufferShortSize, &strLength));
183 ASSERT_EQ(testStrLength, strLength);
/ohos5.0/foundation/multimedia/audio_framework/services/audio_policy/server/src/service/manager/pnp_server/
H A Daudio_socket_thread.cpp515 bool AudioSocketThread::AudioPnpUeventParse(const char *msg, const ssize_t strLength) in AudioPnpUeventParse() argument
523 if (strLength > UEVENT_MSG_LEN + 1) { in AudioPnpUeventParse()
527 …AUDIO_DEBUG_LOG("Param strLength: %{public}zu msg:[%{public}s] len:[%{public}zu]", strLength, msg,… in AudioPnpUeventParse()
528 for (const char *msgTmp = msg; msgTmp < (msg + strLength);) { in AudioPnpUeventParse()
/ohos5.0/docs/en/application-dev/napi/
H A Duse-napi-about-property.md395 const int32_t strLength = 32;
396 char strKey[strLength] = "";
400 napi_get_value_string_utf8(env, str, strKey, strLength, &keyLength);
451 const int32_t strLength = 32;
452 char strKey[strLength] = "";
456 napi_get_value_string_utf8(env, args[1], strKey, strLength, &keyLength);
517 const int32_t strLength = 32;
518 char strKey[strLength] = "";
522 napi_get_value_string_utf8(env, args[1], strKey, strLength, &keyLength);
/ohos5.0/foundation/multimedia/audio_framework/services/audio_policy/server/include/service/manager/pnp_server/
H A Daudio_socket_thread.h36 static bool AudioPnpUeventParse(const char *msg, const ssize_t strLength);
/ohos5.0/foundation/multimedia/av_codec/services/media_engine/plugins/source/http_source/dash/mpd_parser/
H A Ddash_mpd_util.cpp136 size_t strLength = strlen("%0"); in GetSubstitutionStr() local
137 str = str.substr(strLength); in GetSubstitutionStr()
/ohos5.0/base/telephony/core_service/frameworks/js/vcard/src/
H A Dnapi_vcard.cpp358 size_t strLength = 0; in HandleOptionParameters() local
359 napi_get_value_string_utf8(env, charset, strChars, NORMAL_STRING_SIZE, &strLength); in HandleOptionParameters()
360 std::string str8(strChars, strLength); in HandleOptionParameters()
/ohos5.0/foundation/communication/nfc/frameworks/js/napi/common/
H A Dnfc_napi_common_utils.cpp395 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()
/ohos5.0/foundation/ability/dmsfwk/services/dtbschedmgr/src/continue/
H A Ddsched_continue_event.cpp92 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()
/ohos5.0/base/msdp/device_status/frameworks/js/napi/interaction/drag/src/
H A Djs_drag_context.cpp170 size_t strLength = 0; in On() local
171 …CHKRP(napi_get_value_string_utf8(env, argv[0], type, sizeof(type), &strLength), CREATE_STRING_UTF8… in On()
/ohos5.0/foundation/arkui/napi/native_engine/
H A Dnative_engine.cpp324 [[maybe_unused]] size_t strLength = 0; in CreateAsyncWork()
330 strLength = static_cast<size_t>(str->Utf8Length(vm, true) - 1); in CreateAsyncWork()
334 strLength = static_cast<size_t>(copied); in CreateAsyncWork()
336 strLength = 0; in CreateAsyncWork()

12