本文整理自网络,侵删。
function MyPos(const SubStr,S:string): integer;
var
I:integer;
begin
Result:=0;
for I:=1 to Length(S)-Length(SubStr)+1 do
if CompareMem(@S[I], @SubStr[1],Length(SubStr)) then
Result:=Result+ 1;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if MyPos('E',Edit1.Text)>0 then
begin
showmessage('存在');
end;
end; 相关阅读 >>
Delphi xe7的android应用设定wifi的有效无效
Delphi superobject json操作类的基本用法
Delphi firemonkey的屏幕分辨率hdpi、mdpi、ldpi的差别
Delphi 网上获取北京时间firedac 下的 sqlite [3] - 获取数据库的基本信息
更多相关阅读请进入《Delphi》频道 >>