Delphi在字符串中删除指定字符串


本文整理自网络,侵删。

 

function DelStr(hex,str:string):string;
var
i:Integer;
begin
for i:=1 to Length(hex) do
begin
if Copy(Hex,1,Length(str)) = str then
begin
Delete(Hex,1,Length(str))
end
else
begin
result:=result + Copy(Hex,1,1);
Delete(Hex,1,1);
end;
end;
end;

相关阅读 >>

Delphi [数据库连接字符串] access 连接字符串

Delphii控件的安装和卸载方法

Delphi 用 gdi+ 给图片添加花边的例子

Delphi对access文件加密

Delphi winapi: getparent、setparent、movewindow - 获取、指定父窗口和移动窗口

Delphi 字符串中末位是双字节字符的处理(避免最后一位为乱码)

Delphi tstrings 随机打乱

Delphi-基础(for循环)

Delphi 全局键盘钩子(wh_keyboard)

Delphi 生成xml 方法 与 Delphi txt文件操作

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



打赏

取消

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

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

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

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

评论

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