delphi URLEncode


本文整理自网络,侵删。

 
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;   

相关阅读 >>

Delphi如何计算一个文件目录的大小

Delphi idhttp访问datasnap有密码验证的中间件

cnwizards cnpack ide 专家包

Delphi 获取一个文件夹下的一级目录

Delphi字符串隐藏

Delphi 查看指定进程占用端口

Delphi 拷贝文件夹内所有内容

Delphi decodeutf8str解决系统自带utf8解码缺陷

Delphi xe2 新增 system.zip 单元, 可用一句话压缩整个文件夹了

Delphi中复制线程

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...