本文整理自网络,侵删。
function URLEncode(s: string): string;var i: integer; source: PAnsiChar;begin result := ''; source := pansichar(s); for i := 1 to length(source) do if not (source[i - 1] in ['A'..'Z', 'a'..'z', '0'..'9', '-', '_', '~', '.', ':', '/']) then result := result + '%' + inttohex(ord(source[i - 1]), 2) else result := result + source[i - 1];end;
相关阅读 >>
windows关机函数exitwindowsex使用大全(适用windows所有操作平台)
Delphi: ttreeview 中禁止双击事件展开或关闭节点
Delphi clipboard 截图后将图片数据复制到剪贴板
更多相关阅读请进入《Delphi》频道 >>