Home
last modified time | relevance | path

Searched refs:strLen (Results 1 – 25 of 53) sorted by relevance

123

/foundation/communication/wifi/wifi/test/wifi_standard/wifi_hal/unittest/
Dwifi_hal_common_func_test.cpp43 int strLen = MAC_LEN + 1; variable
44 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1);
52 int strLen = MAC_LEN + 1; variable
53 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1);
61 int strLen = MAC_LEN + 1; variable
62 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1);
70 int strLen = MAC_LEN; variable
71 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1);
79 int strLen = MAC_LEN + 1; variable
80 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), 0);
/foundation/distributedhardware/distributed_hardware_fwk/utils/src/
Danonymous_string.cpp32 size_t strLen = value.length(); in GetAnonyString() local
33 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
37 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
40 res += value[strLen - 1]; in GetAnonyString()
44 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/distributeddatamgr/distributedfile/interfaces/kits/napi/common/napi/
Dn_val.cpp52 size_t strLen = 0; in ToUTF8String() local
53 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
58 size_t bufLen = strLen + 1; in ToUTF8String()
60 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
61 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
67 size_t strLen = 0; in ToUTF16String() local
68 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
73 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
74 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
79 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/foundation/distributedhardware/distributed_hardware_fwk/av_transport/common/src/
Dav_trans_log.cpp95 size_t strLen = value.length(); in GetAnonyString() local
96 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
100 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
103 res += value[strLen - 1]; in GetAnonyString()
107 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/distributedhardware/distributed_camera/common/src/utils/
Danonymous_string.cpp63 size_t strLen = value.length(); in GetAnonyString() local
64 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
68 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
71 res += value[strLen - 1]; in GetAnonyString()
75 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/arkui/ui_lite/frameworks/common/
Dimage.cpp107 size_t strLen = strlen(src) + 1; in SetStandardSrc() local
108 char* imagePath = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen))); in SetStandardSrc()
113 if (strcpy_s(imagePath, strLen, src) != EOK) { in SetStandardSrc()
136 size_t strLen = strlen(src) + strlen(suffixName) + 1; in SetLiteSrc() local
137 char* imagePath = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen))); in SetLiteSrc()
142 if (memcpy_s(imagePath, strLen, src, strLen) != EOK) { in SetLiteSrc()
147 if (strcat_s(imagePath, strLen, suffixName) != EOK) { // The format is xxx.xxx.bin in SetLiteSrc()
153 if (memcpy_s(imagePath, strLen, src, strLen) != EOK) { in SetLiteSrc()
159 if (strcat_s(imagePath, strLen, suffixName) != EOK) { // The format is xxx.bin in SetLiteSrc()
166 if (memcpy_s(imagePath, strLen, src, strLen) != EOK) { in SetLiteSrc()
[all …]
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/webgl/src/common/napi/
Dn_val.cpp56 size_t strLen = 0; in ToUTF8String() local
57 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
62 size_t bufLen = strLen + 1; in ToUTF8String()
64 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
65 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
71 size_t strLen = 0; in ToUTF16String() local
72 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
77 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
78 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
83 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/foundation/distributeddatamgr/distributedfile/utils/filemgmt_libn/src/
Dn_val.cpp63 size_t strLen = 0; in ToUTF8String() local
64 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
69 size_t bufLen = strLen + 1; in ToUTF8String()
71 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
72 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
78 size_t strLen = 0; in ToUTF16String() local
79 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
84 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
85 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
90 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/foundation/distributedhardware/device_manager/common/src/
Ddm_anonymous.cpp32 size_t strLen = value.length(); in GetAnonyString() local
33 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
38 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
41 res += value[strLen - 1]; in GetAnonyString()
45 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/distributeddatamgr/distributedfile/interfaces/kits/js/src/common/napi/
Dn_val.cpp63 size_t strLen = 0; in ToUTF8String() local
64 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
69 size_t bufLen = strLen + 1; in ToUTF8String()
71 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
72 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
78 size_t strLen = 0; in ToUTF16String() local
79 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
84 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
85 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
90 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/foundation/distributedhardware/distributed_screen/common/src/
Ddscreen_util.cpp81 size_t strLen = value.length(); in GetAnonyString() local
82 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
86 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
89 res += value[strLen - 1]; in GetAnonyString()
94 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi/
Dn_val.cpp63 size_t strLen = 0; in ToUTF8String() local
64 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
69 size_t bufLen = strLen + 1; in ToUTF8String()
71 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
72 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
88 size_t strLen = 0; in ToUTF16String() local
89 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
94 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
95 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
100 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/foundation/multimedia/av_codec/test/moduletest/audio_decoder/InnerAPI/
DInnerFuzzTest.cpp121 int32_t strLen = rand() % 1000; variable
122 string randStr = getRandStr(strLen);
142 int strLen = 0; variable
147 strLen = rand() % 65536;
148 test_value = getRandStr(strLen);
350 int strLen = 0; variable
356 strLen = rand() % 65536;
357 test_key = getRandStr(strLen);
358 cout << "test key len is:" << strLen << endl;
359 strLen = rand() % 65536;
[all …]
/foundation/communication/dhcp/services/dhcp_server/src/
Ddhcp_binding.c146 size_t strLen = p - pos + 1; in SplitString() local
147 strs[num] = (char *)calloc(strLen, sizeof(char)); in SplitString()
148 if (strs[num] == NULL || strncpy_s(strs[num], strLen, pos, p - pos) != EOK) { in SplitString()
157 size_t strLen = strlen(pos) + 1; in SplitString() local
158 strs[num] = (char *)calloc(strLen, sizeof(char)); in SplitString()
159 if (strs[num] == NULL || strncpy_s(strs[num], strLen, pos, strlen(pos)) != EOK) { in SplitString()
/foundation/arkui/ace_engine_lite/frameworks/src/core/stylemgr/
Dapp_style_item.cpp87 uint16_t strLen = 0; in GenerateFromJSValue() local
88 char *keyNameBuffer = MallocStringOf(stylePropName, &strLen); in GenerateFromJSValue()
94 if (strLen == 0) { in GenerateFromJSValue()
101 uint8_t pseudoType_ = EstimatePseudoClassType(static_cast<char *>(keyNameBuffer), &strLen); in GenerateFromJSValue()
103 CreateStyleItem(KeyParser::ParseKeyId(static_cast<const char *>(keyNameBuffer), strLen), in GenerateFromJSValue()
/foundation/filemanagement/file_api/utils/filemgmt_libn/src/
Dn_val.cpp64 size_t strLen = 0; in ToUTF8String() local
65 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
70 size_t bufLen = strLen + 1; in ToUTF8String()
75 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
76 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
96 size_t strLen = 0; in ToUTF16String() local
97 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
102 auto str = CreateUniquePtr<char16_t[]>(++strLen); in ToUTF16String()
106 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
111 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/hdi_service/common/utils/src/
Ddaudio_utils.cpp33 size_t strLen = value.length(); in GetAnonyString() local
34 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
38 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
41 res += value[strLen - 1]; in GetAnonyString()
45 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/multimedia/av_codec/test/moduletest/audio_encoder/InnerAPI/
DInnerFuzzTest.cpp120 int32_t strLen = rand() % 1000; variable
121 string randStr = getRandStr(strLen);
139 int strLen = 0; variable
144 strLen = rand() % 65536;
145 test_value = getRandStr(strLen);
357 int strLen = 0; variable
363 strLen = rand() % 65536;
364 test_key = getRandStr(strLen);
365 cout << "test key len is:" << strLen << endl;
366 strLen = rand() % 65536;
[all …]
/foundation/arkui/ace_engine/interfaces/napi/kits/utils/
Dnapi_utils.cpp209 size_t strLen = GetParamLen(indexValue) + 1; in ParseResourceParam() local
210 std::unique_ptr<char[]> indexStr = std::make_unique<char[]>(strLen); in ParseResourceParam()
211 napi_get_value_string_utf8(env, indexValue, indexStr.get(), strLen, &ret); in ParseResourceParam()
223 size_t strLen = GetParamLen(bundleNameNApi) + 1; in ParseResourceParam() local
224 std::unique_ptr<char[]> bundleNameStr = std::make_unique<char[]>(strLen); in ParseResourceParam()
225 napi_get_value_string_utf8(env, bundleNameNApi, bundleNameStr.get(), strLen, &ret); in ParseResourceParam()
232 size_t strLen = GetParamLen(moduleNameNApi) + 1; in ParseResourceParam() local
233 std::unique_ptr<char[]> moduleNameStr = std::make_unique<char[]>(strLen); in ParseResourceParam()
234 napi_get_value_string_utf8(env, moduleNameNApi, moduleNameStr.get(), strLen, &ret); in ParseResourceParam()
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_hal/common/
Dwifi_hal_common_func.c47 int ConvertMacToStr(const unsigned char *mac, int macSize, char *macStr, int strLen) in ConvertMacToStr() argument
49 if (mac == NULL || macStr == NULL || macSize != MAC_UINT_SIZE || strLen <= MAC_STRING_SIZE) { in ConvertMacToStr()
58 …if (snprintf_s(macStr, strLen, strLen - 1, "%02x:%02x:%02x:%02x:%02x:%02x", mac[posZero], mac[posO… in ConvertMacToStr()
Dwifi_hal_common_func.h41 int ConvertMacToStr(const unsigned char *mac, int macSize, char *macStr, int strLen);
/foundation/arkui/ui_lite/frameworks/imgdecode/
Dcache_manager.cpp65 size_t strLen = strlen(path); in SetSrc() local
66 if (strLen > MAX_SRC_LENGTH) { in SetSrc()
69 char* newStr = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen) + 1)); in SetSrc()
73 if (memcpy_s(newStr, strLen + 1, path, strLen) != EOK) { in SetSrc()
78 newStr[strLen] = '\0'; in SetSrc()
/foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/src/
Dtrans_tcp_direct_p2p.c302 uint32_t strLen = strlen(reply) + 1; in SendVerifyP2pFailRsp() local
303 char *sendMsg = (char*)SoftBusCalloc(strLen + sizeof(int64_t) + sizeof(int64_t)); in SendVerifyP2pFailRsp()
310 if (strcpy_s(sendMsg + sizeof(int64_t) + sizeof(int64_t), strLen, reply) != EOK) { in SendVerifyP2pFailRsp()
316 …authId, (uint8_t *)sendMsg, strLen + sizeof(int64_t) + sizeof(int64_t), MSG_TYPE_IP_PORT_EXCHANGE); in SendVerifyP2pFailRsp()
333 uint32_t strLen = strlen(reply) + 1; in SendVerifyP2pRsp() local
334 char *sendMsg = (char*)SoftBusCalloc(strLen + sizeof(int64_t) + sizeof(int64_t)); in SendVerifyP2pRsp()
340 if (strcpy_s(sendMsg + sizeof(int64_t) + sizeof(int64_t), strLen, reply) != EOK) { in SendVerifyP2pRsp()
345 …authId, (uint8_t *)sendMsg, strLen + sizeof(int64_t) + sizeof(int64_t), MSG_TYPE_IP_PORT_EXCHANGE); in SendVerifyP2pRsp()
567 uint32_t strLen = strlen(msg) + 1; in StartVerifyP2pInfo() local
568 char *sendMsg = (char*)SoftBusCalloc(strLen + sizeof(int64_t) + sizeof(int64_t)); in StartVerifyP2pInfo()
[all …]
/foundation/ability/ability_runtime/frameworks/simulator/ability_simulator/src/
Djs_console_log.cpp58 size_t strLen = 0; in MakeLogContent() local
59 str->GetCString(buff, bufferLen + 1, &strLen); in MakeLogContent()
/foundation/arkui/ace_engine/frameworks/bridge/common/dom/
Ddom_camera.cpp149 size_t strLen = sizeof(START_STR) - 1; in GetRecorderParam() local
152 if (pos == std::string::npos || (pos + strLen) >= len) { in GetRecorderParam()
156 ss << args.substr(pos + strLen); in GetRecorderParam()

123