Because the HTTP connection ends in HTML or < ends, the string str contains is found recursively, based on the incoming HTTPS tutorial tr style, which is case-insensitive.
private string Gethttpstr (String str, string httpstr)
{
BOOL Ishavevalue = false;
int newlength = Httpstr.length;
string newstr = null;
String httpendstring = "<";
if (str.length >= newlength && str.contains (HTTPSTR))
{
Newstr = str.substring (Str.indexof (HTTPSTR, stringcomparison.ordinalignorecase) + newlength);
}
int startindex = 0;
startindex = Str.indexof (Httpstr, stringcomparison.ordinalignorecase);
int lengthindex = 0;
String returnvalue = null;
if (startindex >= 0)
{
if (Newstr.indexof (' ")!=-1 && newstr.indexof ('") <= Newstr.indexof (httpendstring))
{
Lengthindex = Newstr.indexof (' "") + newlength;
}
else if (Newstr.indexof (' ") = = 1 && newstr.indexof (httpendstring) = = 1)
{
Lengthindex = Str.length;
}
Else
{
Lengthindex = Newstr.indexof (httpendstring) + newlength;
}
if (Lengthindex = = (newlength-1))
{
Lengthindex = Newstr.indexof (httpendstring) + newlength;
}
returnvalue = str.substring (startindex, Lengthindex);
Ishavevalue = true;
}
returnvalue = Replacespecialurl (returnvalue);
Return returnvalue + "" + ((startindex + Lengthindex) < str.length && startindex > 0 && Ishavevalu E? Gethttpstr (str.substring (startindex + lengthindex), HTTPSTR): null);
}