Lines Matching defs:pos
79 size_t pos = 0;
80 if ((pos = input.find(oldstr)) != std::string::npos) {
81 input.replace(pos, oldlen, newstr);
109 size_t pos = temp.find("%");
110 while (pos != std::string::npos && pos < len - 2) { // 2:end subscript backspace
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 %
119 temp.replace(pos, 3, convertedChar); // 3:Replace the percent character with the corresponding char
122 pos = temp.find("%", pos + 1);
218 int pos = static_cast<int>(input.size()) - 1;
219 for (; pos >= 0; pos--) {
220 if (input[pos] == '@') {
224 std::string userAndPasswd = input.substr(0, pos);
225 input = input.substr(pos + 1);
261 size_t pos = 0;
262 while (((pos = input.find('/')) != std::string::npos) ||
263 ((pos = input.find('\\')) != std::string::npos && isSpecial)) {
264 temp.push_back(input.substr(0, pos));
265 input = input.substr(pos + 1);
351 size_t pos = str.rfind(":");
352 size_t index = pos;
353 size_t left = pos + 1;
356 while ((pos = str.find(".", left)) != std::string::npos) {
357 val = str.substr(left, pos - left);
364 left = pos + 1;
379 size_t pos = str.find("::");
380 size_t index = pos;
381 if (pos != std::string::npos) {
384 while ((pos = str.find(":", left)) != std::string::npos) {
386 left = pos + 1;
474 size_t pos = 0;
476 while ((pos = str.find(":", left)) != std::string::npos) {
477 temp.push_back(str.substr(left, pos - left));
478 left = pos + 1;
504 size_t pos = 0;
505 pos = input.find('.');
506 if (pos != std::string::npos) {
580 size_t pos = 0;
582 while ((pos = str.find(".", left)) != std::string::npos) {
583 temp.push_back(str.substr(left, pos - left));
584 left = pos + 1;
771 size_t pos = 0;
772 while (((pos = input.find('/')) != std::string::npos) || ((pos = input.find('\\')) != std::string::npos)) {
773 temp.push_back(input.substr(0, pos));
774 input = input.substr(pos + 1);
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);
835 size_t pos = 0;
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) {
842 AnalysisSpecialFile(temp, pos, urlinfo, flags);
883 size_t pos = 0;
884 if (strHost[strHost.size() - 1] != ']' && (pos = strHost.find_last_of(':')) != std::string::npos) {
885 std::string port = strHost.substr(pos + 1);
886 strHost = strHost.substr(0, pos);
931 size_t pos = 0;
932 if (strHost[strHost.size() - 1] != ']' && (pos = strHost.find_last_of(':')) != std::string::npos) {
933 std::string port = strHost.substr(pos + 1);
934 strHost = strHost.substr(0, pos);
937 if (strHost[strHost.size() - 1] != ']' && (pos = strHost.find_last_of(':')) != std::string::npos &&
958 std::bitset<static_cast<size_t>(BitsetStatusFlag::BIT_STATUS_11)>& flags, size_t pos)
969 if ((pos = strHost.find_last_of(':')) != std::string::npos) {
970 std::string port = strHost.substr(pos + 1);
971 strHost = strHost.substr(0, pos);
974 if ((pos = strHost.find_last_of(':')) != std::string::npos &&
982 void JudgePos(size_t &pos, const size_t &length, const std::string& input)
984 for (pos = 0; pos < length; pos++) {
985 if (input[pos] == '/' || input[pos] == '\\') {
991 void SkipSlashSymbol(std::string& input, size_t& pos)
994 while (pos < inputLen) {
995 if (input[pos] == '/' || input[pos] == '\\') {
996 pos++;
1001 input = input.substr(pos);
1004 void ParsingHostAndPath(std::string& input, UrlData& urlinfo, size_t& pos,
1009 JudgePos(pos, length, input);
1010 std::string strHost = input.substr(0, pos);
1011 std::string strPath = input.substr(pos + 1);
1019 if (strHost[strHost.size() - 1] != ']' && (pos = strHost.find_last_of(':')) != std::string::npos) {
1020 pos = strHost.find_last_of(':');
1021 if (pos != std::string::npos) {
1022 std::string port = strHost.substr(pos + 1);
1023 strHost = strHost.substr(0, pos);
1039 size_t pos = 0;
1040 SkipSlashSymbol(input, pos);
1045 ParsingHostAndPath(input, urlinfo, pos, flags);
1048 AnalysisOnlyHost(input, urlinfo, flags, pos);
1062 size_t pos = 0;
1064 pos = input.find('#');
1065 std::string fragment = input.substr(pos);
1067 input = input.substr(0, pos);
1070 pos = input.find('?');
1071 std::string query = input.substr(pos);
1073 input = input.substr(0, pos);
1139 size_t pos = input.find(':');
1140 pos++;
1141 std::string scheme = input.substr(0, pos);
1157 std::string str = input.substr(pos);
1452 for (size_t pos = 0; pos < length; pos++) {
1453 if ((strHost[pos] == ':') || (strHost[pos] == '?') || (strHost[pos] == '#') ||
1454 (strHost[pos] == '/') || (strHost[pos] == '\\')) {
1455 strHost = strHost.substr(0, pos);
1529 for (size_t pos = 0; pos < strlen; pos++) {
1530 if ((input[pos] == ':') || (input[pos] == '?') || (input[pos] == '#') ||
1531 (input[pos] == '/') || (input[pos] == '\\')) {
1532 strHost = input.substr(0, pos);
1533 if (input[pos] == ':') {
1534 pos++;
1535 port = input.substr(pos);
1568 for (size_t pos = 0; pos < strlen; pos++) {
1569 if ((port[pos] == '?') || (port[pos] == '#') || (port[pos] == '/') || (port[pos] == '\\')) {
1570 port = port.substr(0, pos);
1590 for (size_t pos = 0; pos < portlen; pos++) {
1591 if ((port[pos] == '?') || (port[pos] == '#') || (port[pos] == '/') || (port[pos] == '\\')) {
1592 port = port.substr(0, pos);