delphi 检测是否包含字符


本文整理自网络,侵删。

 
function CharInString (S: string; Ch: Char): Boolean;
var
  I: Integer;
begin
  Result := False;
  for I := Low (S) to High (S) do
    if (S[I]) = Ch then
    begin
      Result := True;
      Exit;
    end;
end;

function CharInString2 (S: string; Ch: Char): Boolean;
var
  I: Integer;
begin
  Result := False;
  for I := Low (S) to High (S) do
    if (S[I]) = Ch then
      Exit (True);
end;

相关阅读 >>

Delphi的整数性能测试

Delphi 文件夹拷贝子文件及文件夹

Delphi 获取android package name:

Delphi代码变异加密工具

Delphi 转换swf到exe

Delphi 中format的字符串格式化使用说明

Delphi idhttp控件断点下载

Delphi real控件 rm格式的播放器

Delphi vcl 模式下和firemonkey 模式下的字符串

Delphi 根据文本高度确定richedit高度

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



打赏

取消

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

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

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

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

评论

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