16,747
社区成员




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;