Delphi AnsiEndsText 用法之一(路径结尾自动加\)


本文整理自网络,侵删。

 
引用单元:System.StrUtils

首部 function AnsiEndsText(const ASubText, AText: string): Boolean; $[StrUtils.pas
功能 返回字符串AText是否以子串ASubText结尾
说明 不区分大小写
参考 function Windows.CompareString
例子 CheckBox1.Checked := AnsiEndsText(Edit1.Text, Edit2.Text);


var
Str:string;
begin
Str:='c:';

if AnsiEndsText('\', Str) then
      Edit1.Text := Str
    else
      Edit1.Text := Str + '\';
  end;

演示图:



相关阅读 >>

Delphi sysem.json 链式写法

Delphi xe 使用savestate保存firemonkey状态的示例

Delphi的goto语句

Delphi idftp用法

Delphi 泛型 tdictionary<string,string>

Delphi程序不受windows日期格式的影响

Delphi 如何读取内存中的数据?

Delphi中move 函数额用法

Delphi tgpimage 把图像转存为其他格式

Delphi 字符串分割

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



打赏

取消

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

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

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

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

评论

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