Delete www string in delphi
Posted on 2011-03-04
please help me.
i have a list of sites.many sites contains www. in his link
i wrote a procedure that deletes it, but any times it doesnt work correctly.
There is :
function Deletewww(URL : string) : string;
if Pos('www.', URL) > 0 then Delete(Url, 1, 7);
Result := Copy(Url, 1, Pos('w.', Url) - 1);
if Result = '' then Result := URL;
Please correct it.