Lines Matching refs:string

24     std::map<std::string, int> g_head = {

29 std::vector<std::string> g_doubleSegment = {
34 std::vector<std::string> g_singlesegment = { ".", "%2e", "%2E" };
35 std::vector<std::string> g_specialSymbols = {
60 bool CheckCharacter(std::string data, std::bitset<static_cast<size_t>(BitsetStatusFlag::MAX_BIT_SIZE)> rule)
75 void ReplaceSpecialSymbols(std::string& input, std::string& oldstr, std::string& newstr)
80 if ((pos = input.find(oldstr)) != std::string::npos) {
102 std::string DecodeSpecialChars(std::string input)
104 std::string temp = input;
110 while (pos != std::string::npos && pos < len - 2) { // 2:end subscript backspace
112 std::string subStr = temp.substr(pos + 1, 2); // 2:Truncate the last two digits of the %
118 std::string convertedChar(1, static_cast<char>(octNum));
120 len = len - 2; // 2:After the replacement, the length of the string is reduced by two
127 void DeleteC0OrSpace(std::string& str)
155 void DeleteTabOrNewline(std::string& str1)
166 bool IsSpecial(std::string scheme)
175 bool AnalysisScheme(std::string& input, std::string& scheme,
202 void AnalysisFragment(const std::string& input, std::string& fragment,
209 void AnalysisQuery(const std::string& input, std::string& query,
215 void AnalysisUsernameAndPasswd(std::string& input, std::string& username, std::string& password,
224 std::string userAndPasswd = input.substr(0, pos);
229 if (userAndPasswd.find('@') != std::string::npos) {
232 if ((posTmp = userAndPasswd.find('@')) != std::string::npos) {
239 if (userAndPasswd.find(':') != std::string::npos) {
241 std::string user = userAndPasswd.substr(0, position);
242 std::string keyWord = userAndPasswd.substr(position + 1);
257 void AnalysisPath(std::string& input, std::vector<std::string>& path,
260 std::vector<std::string> temp;
262 while (((pos = input.find('/')) != std::string::npos) ||
263 ((pos = input.find('\\')) != std::string::npos && isSpecial)) {
299 void AnalysisPort(std::string input, UrlData& urlinfo,
332 void AnalysisOpaqueHost(std::string input, std::string& host,
348 std::string DealIpv4(std::string str)
350 std::vector<std::string> temp;
355 std::string val = "";
356 while ((pos = str.find(".", left)) != std::string::npos) {
372 std::string res = str.substr(0, index);
377 void FormatIpv6(std::string& str)
381 if (pos != std::string::npos) {
384 while ((pos = str.find(":", left)) != std::string::npos) {
389 std::string temp = "";
401 void RemoveLeadingZeros(std::vector<std::string> &ipv6)
422 std::string ZeroCompression(std::vector<std::string> &ipv6)
443 std::string res = "";
461 void ToLower(std::string &str)
471 std::string Compress(std::string str)
473 std::vector<std::string> temp;
476 while ((pos = str.find(":", left)) != std::string::npos) {
482 std::string res = ZeroCompression(temp);
487 void IPv6Host(std::string& input, std::string& host,
506 if (pos != std::string::npos) {
516 bool IsRadix(std::string num, std::string radix)
520 if (radix.find(num[i]) == std::string::npos) {
527 bool IsNumber(std::string num, int &radix)
532 std::string subStr = num.substr(2); // 2:jump 0x
539 std::string subStr = num.substr(1);
551 std::string BinaryConversion(std::string num, int radix)
577 bool RemovalIpv4(std::vector<std::string> &temp, std::string str,
582 while ((pos = str.find(".", left)) != std::string::npos) {
592 std::vector<std::string> res;
616 int IsFormatIpv4(std::vector<std::string> nums)
630 std::string SplitNum(std::string num, size_t& number)
637 std::vector<std::string> nums;
638 std::string res = "";
651 void FormatIpv4(std::vector<std::string> nums, std::string& host,
656 std::string res = "";
672 std::string temp = SplitNum(nums[index], number);
688 void AnalyseIPv4(const std::string& input, std::string& host,
692 std::vector<std::string> temp;
700 std::string res = "";
729 void AnalysisHost(std::string& input, std::string& host,
751 std::string decodeInput = DecodeSpecialChars(input);
759 bool ISFileNohost(const std::string& input)
767 void AnalysisFilePath(std::string& input, UrlData& urlinfo,
770 std::vector<std::string> temp;
772 while (((pos = input.find('/')) != std::string::npos) || ((pos = input.find('\\')) != std::string::npos)) {
802 std::string it = urlinfo.path[0];
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);
829 void AnalysisFile(std::string& input, UrlData& urlinfo,
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) {
840 } else if ((((pos = temp.find('/')) != std::string::npos) ||
841 ((pos = temp.find('\\')) != std::string::npos)) && pos != 0) {
859 void AnalysisFilescheme(const std::string& input, UrlData& urlinfo,
862 std::string strPath = urlinfo.scheme + input;
869 UrlData& urlinfo, const std::string& input)
880 void AnalyHostPath(std::string &strHost, std::bitset<static_cast<size_t>(BitsetStatusFlag::BIT_STATUS_11)>& flags,
884 if (strHost[strHost.size() - 1] != ']' && (pos = strHost.find_last_of(':')) != std::string::npos) {
885 std::string port = strHost.substr(pos + 1);
893 void AnalyStrHost(std::string &strHost, UrlData& urlinfo,
896 if (strHost.find('@') != std::string::npos) {
905 void AnalysisNoDefaultProtocol(std::string& input, UrlData& urlinfo,
913 std::string hostandpath = input.substr(2); // 2:Intercept from 2 subscripts
919 std::string strHost = "";
920 if (hostandpath.find('/') != std::string::npos) {
923 std::string strPath = hostandpath.substr(i + 1);
924 if (strHost.find('@') != std::string::npos) {
932 if (strHost[strHost.size() - 1] != ']' && (pos = strHost.find_last_of(':')) != std::string::npos) {
933 std::string port = strHost.substr(pos + 1);
937 if (strHost[strHost.size() - 1] != ']' && (pos = strHost.find_last_of(':')) != std::string::npos &&
950 std::string strOfPath = input.substr(1);
957 void AnalysisOnlyHost(const std::string& input, UrlData& urlinfo,
960 std::string strHost = input;
961 if (strHost.find('@') != std::string::npos) {
969 if ((pos = strHost.find_last_of(':')) != std::string::npos) {
970 std::string port = strHost.substr(pos + 1);
974 if ((pos = strHost.find_last_of(':')) != std::string::npos &&
982 void JudgePos(size_t &pos, const size_t &length, const std::string& input)
991 void SkipSlashSymbol(std::string& input, size_t& pos)
1004 void ParsingHostAndPath(std::string& input, UrlData& urlinfo, size_t& pos,
1010 std::string strHost = input.substr(0, pos);
1011 std::string strPath = input.substr(pos + 1);
1012 if (strHost.find('@') != std::string::npos) {
1019 if (strHost[strHost.size() - 1] != ']' && (pos = strHost.find_last_of(':')) != std::string::npos) {
1021 if (pos != std::string::npos) {
1022 std::string port = strHost.substr(pos + 1);
1027 if (strHost[strHost.size() - 1] != ']' && strHost.find_last_of(':') != std::string::npos &&
1035 void AnalysisHostAndPath(std::string& input, UrlData& urlinfo,
1044 } else if ((input.find('/') != std::string::npos || input.find('\\') != std::string::npos)) {
1046 } else if (input.size() != 0 && input.find('/') == std::string::npos &&
1047 input.find('\\') == std::string::npos) {
1059 void AnalysisInput(std::string& input, UrlData& urlData,
1063 if (input.find('#') != std::string::npos) {
1065 std::string fragment = input.substr(pos);
1069 if (input.find('?') != std::string::npos) {
1071 std::string query = input.substr(pos);
1076 std::string pathStr = input;
1131 void InitOnlyInput(std::string& input, UrlData& urlData,
1138 if (input.find(':') != std::string::npos) {
1141 std::string scheme = input.substr(0, pos);
1145 if (input.find('#') != std::string::npos) {
1147 std::string fragment = input.substr(posTmp);
1151 if (input.find('?') != std::string::npos) {
1153 std::string query = input.substr(position);
1157 std::string str = input.substr(pos);
1169 void ToolHasBase(std::string input, std::string &strInput, UrlData &urlData,
1180 std::string BasePathToStr(UrlData &urlData)
1182 std::string temp = "";
1194 URL::URL(const std::string& input)
1196 std::string str = input;
1203 void DelCont(std::string strBase, std::string &strInput, UrlData &baseInfo,
1213 URL::URL(const std::string& input, const std::string& base)
1217 std::string strBase = base;
1218 std::string strInput = input;
1233 std::string newInput = baseInfo.scheme + input;
1250 std::string basePathStr = BasePathToStr(baseInfo);
1263 URL::URL(const std::string& input, const URL& base)
1265 std::string strInput = input;
1276 std::string newInput = baseInfo.scheme + input;
1293 std::string basePathStr = BasePathToStr(baseInfo);
1308 std::string temp = "";
1319 std::string temp = "";
1330 std::string temp = "";
1341 std::string temp = "";
1352 std::string temp = "";
1363 std::string temp = "";
1374 std::string temp = "/";
1401 std::string temp = "";
1412 std::string temp = urlData_.host;
1445 void URL::SetHostname(const std::string& input)
1450 std::string strHost = input;
1464 std::string thisHostname = "";
1475 void URL::SetHref(const std::string& input)
1477 std::string str = input;
1489 void URL::SetPath(const std::string& input)
1491 std::string strPath = input;
1495 std::string oldstr = "%3A";
1496 std::string newstr = ":";
1512 std::vector<std::string> thisPath;
1526 void SplitString(const std::string& input, std::string& strHost, std::string& port)
1542 void URL::SetHost(const std::string& input)
1547 std::string strHost = input;
1548 std::string port = "";
1555 std::string thisHostname = "";
1586 void URL::SetPort(const std::string& input)
1588 std::string port = input;
1607 void URL::SetSearch(const std::string& input)
1609 std::string temp;
1620 std::string oldstr = "#";
1621 std::string newstr = "%23";
1627 void URL::SetFragment(const std::string& input)
1629 std::string temp;
1644 void URL::SetScheme(const std::string& input)
1646 std::string strInput = input;
1655 std::string thisScheme = "";
1665 void URL::SetUsername(const std::string& input)
1671 std::string usname = input;
1681 void URL::SetPassword(const std::string& input)
1687 std::string keyWord = input;
1697 bool ContainsWideOrUnicodeChars(const std::string& str)
1729 std::string URLSearchParams::ToUSVString(std::string inputStr)
1743 std::string reStr = "";
1765 std::string name = "";
1777 std::string sname = name;
1796 std::string name = "";
1808 std::string sname = name;
1831 std::string name = "";
1843 std::string tempName = name;
1844 std::string value = "";
1856 std::string tempValue = value;
1862 std::string name = "";
1874 std::string sname = name;
1915 std::string buf = "";
1936 std::string buffer = "";
1948 std::string cppName = buffer;
1949 std::string temp = "";
1961 std::string cppValue = temp;
1993 const std::string curKey = searchParams[i];
1994 const std::string curVal = searchParams[i + 1];
2005 std::vector<std::string> toKeys;
2025 std::vector<std::string> toKeys;
2045 void URLSearchParams::SetArray(napi_env env, const std::vector<std::string> vec)