Lines Matching refs:temp
104 std::string temp = input;
105 size_t len = temp.size();
107 return temp;
109 size_t pos = temp.find("%");
111 if (IsHexDigit(temp[pos + 1]) && IsHexDigit(temp[pos + 2])) { // 2:Determine the second character after %
112 std::string subStr = temp.substr(pos + 1, 2); // 2:Truncate the last two digits of the %
116 return temp;
119 temp.replace(pos, 3, convertedChar); // 3:Replace the percent character with the corresponding char
122 pos = temp.find("%", pos + 1);
124 return temp;
168 auto temp = g_head.count(scheme);
169 if (temp > 0) {
260 std::vector<std::string> temp;
264 temp.push_back(input.substr(0, pos));
267 temp.push_back(input);
268 size_t length = temp.size();
270 auto result = find(g_doubleSegment.begin(), g_doubleSegment.end(), temp[it]);
286 result = find(g_singlesegment.begin(), g_singlesegment.end(), temp[it]);
293 path.push_back(temp[it]);
350 std::vector<std::string> temp;
363 temp.push_back(hexVal);
371 temp.push_back(hexVal);
373 res = res + ":" + temp[0] + temp[1] + ":" + temp[2] + temp[3]; // 2:subscript 3:subscript
389 std::string temp = "";
391 temp += ":0";
393 temp += ":";
394 str.replace(index, 2, temp); // 2:jump"::"
473 std::vector<std::string> temp;
477 temp.push_back(str.substr(left, pos - left));
480 temp.push_back(str.substr(left));
481 RemoveLeadingZeros(temp);
482 std::string res = ZeroCompression(temp);
577 bool RemovalIpv4(std::vector<std::string> &temp, std::string str,
583 temp.push_back(str.substr(left, pos - left));
588 temp.push_back(str.substr(left));
591 size_t tmpLen = temp.size();
595 if (IsNumber(temp[i], radix)) {
596 res.push_back(BinaryConversion(temp[i], radix));
601 temp = res;
604 if (temp[i] == "") {
608 temp.push_back("");
672 std::string temp = SplitNum(nums[index], number);
678 temp = "0." + temp;
680 host = res + temp;
692 std::vector<std::string> temp;
693 isipv4 = RemovalIpv4(temp, input, flags);
694 size_t tempLen = temp.size();
695 size_t lastSize = temp[tempLen - 1].size();
702 res += temp[i];
713 if (IsFormatIpv4(temp) == -1) {
720 FormatIpv4(temp, host, flags);
770 std::vector<std::string> temp;
773 temp.push_back(input.substr(0, pos));
776 temp.push_back(input);
777 size_t length = temp.size();
779 auto a = find(g_doubleSegment.begin(), g_doubleSegment.end(), temp[i]);
787 if (i == temp.size() - 1) {
792 a = find(g_singlesegment.begin(), g_singlesegment.end(), temp[i]);
794 if (i == temp.size() - 1) {
799 urlinfo.path.push_back(temp[i]);
812 void AnalysisSpecialFile(std::string& temp, size_t pos, UrlData& urlinfo,
815 std::string strHost = temp.substr(0, pos);
816 std::string strPath = temp.substr(pos + 1);
826 AnalysisFilePath(temp, urlinfo, flags);
834 std::string temp = input.substr(2); // 2:Intercept from 2 subscripts
836 if ((((pos = temp.find('/')) != std::string::npos) ||
837 ((pos = temp.find('\\')) != std::string::npos)) && pos == 0) {
838 temp = temp.substr(1);
839 AnalysisFilePath(temp, urlinfo, flags);
840 } else if ((((pos = temp.find('/')) != std::string::npos) ||
841 ((pos = temp.find('\\')) != std::string::npos)) && pos != 0) {
842 AnalysisSpecialFile(temp, pos, urlinfo, flags);
844 if (!temp.empty() && flags.test(static_cast<size_t>(BitsetStatusFlag::BIT0))) {
845 AnalysisHost(temp, urlinfo.host, flags, special);
846 } else if (!temp.empty() && !flags.test(static_cast<size_t>(BitsetStatusFlag::BIT0))) {
847 AnalysisHost(temp, urlinfo.host, flags, special);
1182 std::string temp = "";
1186 temp += urlData.path[i] + "/";
1188 temp += urlData.path[i];
1191 return temp;
1308 std::string temp = "";
1310 temp = urlData_.host;
1312 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1319 std::string temp = "";
1321 temp = urlData_.query;
1323 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1330 std::string temp = "";
1332 temp = urlData_.username;
1334 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1341 std::string temp = "";
1343 temp = urlData_.password;
1345 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1352 std::string temp = "";
1354 temp = urlData_.fragment;
1356 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1363 std::string temp = "";
1365 temp = urlData_.scheme;
1367 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1374 std::string temp = "/";
1376 temp = "";
1382 temp += urlData_.path[i] + "/";
1384 temp += urlData_.path[i];
1390 temp = "";
1393 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1401 std::string temp = "";
1403 temp = std::to_string(urlData_.port);
1405 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1412 std::string temp = urlData_.host;
1414 temp += ":";
1415 temp += std::to_string(urlData_.port);
1417 NAPI_CALL(env, napi_create_string_utf8(env, temp.c_str(), temp.size(), &result));
1609 std::string temp;
1615 temp = "?";
1616 temp += input;
1618 temp = input;
1622 ReplaceSpecialSymbols(temp, oldstr, newstr);
1623 AnalysisQuery(temp, urlData_.query, flags_);
1629 std::string temp;
1635 temp = "#";
1636 temp += input;
1638 temp = input;
1640 AnalysisFragment(temp, urlData_.fragment, flags_);
1829 void URLSearchParams::Append(napi_env env, napi_value buffer, napi_value temp)
1846 if (napi_get_value_string_utf8(env, temp, nullptr, 0, &valueSize) != napi_ok) {
1847 HILOG_ERROR("can not get temp size");
1852 if (napi_get_value_string_utf8(env, temp, value.data(), valueSize + 1, &valueSize) != napi_ok) {
1853 HILOG_ERROR("can not get temp value");
1949 std::string temp = "";
1955 temp.reserve(tempSize);
1956 temp.resize(tempSize);
1957 if (napi_get_value_string_utf8(env, value, temp.data(), tempSize + 1, &tempSize) != napi_ok) {
1961 std::string cppValue = temp;