function IsProtocolSupported(const url: string): boolean;
const
Protocols: array [1..3] of string =
('http:', 'https:', 'magnet:');
var
i: integer;
s: string;
begin
s:=AnsiLowerCase(url);
for i:=Low(Protocols) to High(Protocols) do
if Copy(s, 1, Length(Protocols[i])) = Protocols[i] then begin
Result:=True;
exit;
end;
Result:=False;
end;
Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号
执行时间: 0.0397047996521 seconds