Home
last modified time | relevance | path

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

/foundation/ace/ace_engine_lite/frameworks/src/core/base/
Dnumber_parser.cpp30 bool NumberParser::ParseDoubleValue(const char *str, uint16_t strLength, double &outValue) in ParseDoubleValue() argument
32 if (!IsValidString(str, strLength)) { in ParseDoubleValue()
48 bool NumberParser::ParsePercentValue(const char *percentStr, uint16_t strLength, float &outValue) in ParsePercentValue() argument
52 if (!(IsValidString(percentStr, strLength)) || (strLength < minLength)) { in ParsePercentValue()
57 uint16_t ensuredStrLength = (strLength > originalStrLen) ? originalStrLen : strLength; in ParsePercentValue()
94 bool NumberParser::IsValidString(const char *str, uint16_t strLength) in IsValidString() argument
96 return ((str != nullptr) && (strLength != 0)); in IsValidString()
Dnumber_parser.h41 static bool ParseDoubleValue(const char *str, uint16_t strLength, double &outValue);
51 static bool ParsePercentValue(const char *percentStr, uint16_t strLength, float &outValue);
60 static bool IsValidString(const char *str, uint16_t strLength);
Djs_fwk_common.cpp131 char *MallocStringOf(jerry_value_t source, uint16_t *strLength) in MallocStringOf() argument
133 if ((IS_UNDEFINED(source)) || (strLength == nullptr)) { in MallocStringOf()
137 *strLength = 0; in MallocStringOf()
183 *strLength = length; in MallocStringOf()
1303 uint16_t strLength = 0; in ParseKeyIdFromJSString() local
1304 char *keyStr = MallocStringOf(str, &strLength); in ParseKeyIdFromJSString()
1306 if (strLength != 0) { in ParseKeyIdFromJSString()
1307 keyId = KeyParser::ParseKeyId(keyStr, strLength); in ParseKeyIdFromJSString()
Djs_fwk_common.h190 char *MallocStringOf(jerry_value_t source, uint16_t *strLength);
/foundation/ace/ace_engine_lite/frameworks/src/core/components/test/unittest/common/
Dpercent_tdd_test.cpp151 uint16_t strLength = 5; variable
156 bool result = NumberParser::ParsePercentValue(nullptr, strLength, percentValue);
170 uint16_t strLength = 1; variable
176 bool result = NumberParser::ParsePercentValue(strBuffer, strLength, percentValue);
190 uint16_t strLength = 4; variable
196 bool result = NumberParser::ParsePercentValue(strBuffer, strLength, percentValue);
212 uint16_t strLength = 7; variable
218 bool result = NumberParser::ParsePercentValue(strBuffer, strLength, percentValue);
232 uint16_t strLength = 20; variable
238 bool result = NumberParser::ParsePercentValue(strBuffer, strLength, percentValue);
[all …]
/foundation/aafwk/standard/interfaces/kits/napi/aafwk/formUtil/
Dnapi_form_util.cpp169 size_t strLength = strInfo.size(); in ConvertStringToInt64() local
170 if (strLength == ZERO_VALUE) { in ConvertStringToInt64()
179 if (strLength < INT_64_LENGTH) { in ConvertStringToInt64()
184 if (strLength == INT_64_LENGTH && maxSubValue < BASE_NUMBER) { in ConvertStringToInt64()
190 if (strLength == INT_64_LENGTH && subValue <= INT64_MAX - BASE_NUMBER * in ConvertStringToInt64()
196 if (strLength < INT_64_LENGTH + 1) { // The minimum value: -9223372036854775808 in ConvertStringToInt64()
200 if (strLength == INT_64_LENGTH + 1) { in ConvertStringToInt64()
/foundation/ace/ace_engine_lite/frameworks/src/core/stylemgr/
Dapp_style_item.cpp131 uint16_t strLength = 0; in CreateStyleItem() local
132 strValueBuffer = MallocStringOf(stylePropValue, &strLength); in CreateStyleItem()
140 if (NumberParser::ParsePercentValue(strValueBuffer, strLength, percentValue)) { in CreateStyleItem()
/foundation/ace/ace_engine_lite/frameworks/src/core/modules/presets/
Dcjson_parser.cpp224 uint16_t strLength = 0; // the length of result in ToString() local
228 if ((valueLen > (MAX_VALUE_LEN - 1)) || (strLength > (MAX_VALUE_LEN - 1)) || in ToString()
229 (strLength + valueLen > (MAX_VALUE_LEN - 1))) { in ToString()
234 strLength += valueLen; in ToString()
240 strLength++; in ToString()
241 char *result = static_cast<char *>(ace_malloc(strLength)); in ToString()
248 if (strcpy_s(result, strLength, temp[0]) != 0) { in ToString()
255 if (strcat_s(result, strLength, temp[i]) != 0) { in ToString()
Dconsole_log_impl.cpp147 size_t strLength = strlen(str); in LogString() local
148 for (size_t i = 0; i < strLength; i++) { in LogString()
/foundation/aafwk/standard/interfaces/innerkits/runtime/include/
Djs_runtime_utils.h86 size_t strLength = 0; in ConvertFromJsValue() local
87 stringValue->GetCString(buffer.get(), len, &strLength); in ConvertFromJsValue()
/foundation/ace/napi/test/unittest/
Dtest_napi_ext.cpp188 size_t strLength = 0; variable
192 ASSERT_CHECK_CALL(napi_get_value_string_utf16(env, result, buffer, bufferSize + 1, &strLength));
196 ASSERT_EQ(testStrLength, strLength);
202 …ERT_CHECK_CALL(napi_get_value_string_utf16(env, result, bufferShort, bufferShortSize, &strLength));
210 ASSERT_EQ(testStrLength, strLength);
Dtest_napi.cpp148 size_t strLength = 0; variable
152 ASSERT_CHECK_CALL(napi_get_value_string_utf8(env, result, buffer, bufferSize + 1, &strLength));
154 ASSERT_EQ(testStrLength, strLength);
/foundation/aafwk/standard/interfaces/kits/napi/aafwk/formManager/
Dnapi_form_manager.cpp105 size_t strLength = strInfo.size(); in ConvertStringToInt64() local
106 if (strLength == ZERO_VALUE) { in ConvertStringToInt64()
115 if (strLength < INT_64_LENGTH) { in ConvertStringToInt64()
120 if (strLength == INT_64_LENGTH && maxSubValue < BASE_NUMBER) { in ConvertStringToInt64()
126 if (strLength == INT_64_LENGTH && subValue <= INT_64_MAX_VALUE - BASE_NUMBER * in ConvertStringToInt64()
132 if (strLength < INT_64_LENGTH + 1) { // The minimum value: -9223372036854775808 in ConvertStringToInt64()
136 if (strLength == INT_64_LENGTH + 1) { in ConvertStringToInt64()
/foundation/communication/bluetooth/interfaces/kits/napi/src/
Dnapi_bluetooth_host.cpp127 size_t strLength = 0; in SetLocalName() local
131 napi_get_value_string_utf8(env, argv[PARAM0], buffer, bufferSize + 1, &strLength); in SetLocalName()
/foundation/communication/ipc/ipc/native/src/napi/src/
Dnapi_message_parcel.cpp288 size_t strLength = 0; in JS_writeChar() local
292 napi_get_value_string_utf8(env, argv[0], buffer, bufferSize + 1, &strLength); in JS_writeChar()
661 size_t strLength = 0; in JS_writeCharArray() local
665 napi_get_value_string_utf8(env, element, buffer, bufferSize + 1, &strLength); in JS_writeCharArray()
666 DBINDER_LOGI("messageparcel writeChar strLength = %{public}d", (int)strLength); in JS_writeCharArray()
/foundation/ace/ace_engine/frameworks/bridge/declarative_frontend/engine/jsi/
Djsi_declarative_engine.cpp578 size_t strLength = 0; in GetLogContent() local
580 nativeString->GetCString(buffer, bufferSize + 1, &strLength); in GetLogContent()
/foundation/ace/ace_engine/adapter/ohos/entrance/pa_engine/engine/jsi/
Djsi_pa_engine.cpp361 size_t strLength = 0; in GetLogContent() local
363 nativeString->GetCString(buffer, bufferSize + 1, &strLength); in GetLogContent()
/foundation/ace/ace_engine/frameworks/bridge/js_frontend/engine/jsi/
Djsi_engine.cpp2816 size_t strLength = 0; in GetLogContent() local
2818 nativeString->GetCString(buffer, bufferSize + 1, &strLength); in GetLogContent()