有个回车符而已,去掉就行了 function ThunderEncode(URL: string): string; begin Result := ''; if URL = '' then Exit; URL := 'AA' + URL + 'ZZ'; Result := 'thunder://' + EncodeString(URL); Result := ReplaceText(Result, #13#10, ''); end;function ThunderDecode(ThunderURL: string): string; begin Result := ''; if SameText(LeftStr(ThunderURL, 10), 'Thunder://') then begin Result := DecodeString(Copy(ThunderURL, 11, Length(ThunderURL))); Delete(Result, 1, 2); Delete(Result, Length(Result) - 1, 2); end; end;
uses
EncdDecd;function ThunderEncode(HttpURL: string): string;
begin
Result := '';
if HttpURL = '' then
Exit;
HttpURL := 'AA' + HttpURL + 'ZZ';
Result := 'thunder://' + EncodeString(HttpURL);
end;
URL长点 后面的显示不出来....
可有办法呀
URL:ftp://tv:[email protected]:88888/[迅雷下载www.csdn.net]龙门飞甲TS枪版.rmvb
转出来是:thunder://QUFmdHA6Ly90djp0dkB4bGguY3Nkbi5uZXQ6ODg4ODgvW9G4wNfPwtTYd3d3LmNzZG4ubmV0XcH6
w8W3ybzXVFPHubDmLnJtdmJaWg==
接出来是:ftp://tv:[email protected]:23352/[迅雷下载www.csdn.net]龙
function ThunderEncode(URL: string): string;
begin
Result := '';
if URL = '' then
Exit;
URL := 'AA' + URL + 'ZZ';
Result := 'thunder://' + EncodeString(URL);
Result := ReplaceText(Result, #13#10, '');
end;function ThunderDecode(ThunderURL: string): string;
begin
Result := '';
if SameText(LeftStr(ThunderURL, 10), 'Thunder://') then
begin
Result := DecodeString(Copy(ThunderURL, 11, Length(ThunderURL)));
Delete(Result, 1, 2);
Delete(Result, Length(Result) - 1, 2);
end;
end;