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;   

相关阅读 >>

encryptit.pas

Delphi 安卓原生的toast温柔提示

Delphi 获取计算机已运行时间

Delphi编程时按回车键无效,无法换行解决办法

Delphi中建议使用的语句

Delphi连接access提示密码无效解决一例

Delphi 如何从一张图片中裁剪一部分距形图片另存为文件(使用canvas.copyrect)

Delphi winsocks检测某个tcp端口师傅正在被使用

Delphi xe的firemonkey获取当前文件所在路径的方法

Delphi 时间耗时统计

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



打赏

取消

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

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

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

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

评论

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

    暂无评论...