delphi TStringList.Find


本文整理自网络,侵删。

 
procedure TForm1.Btnx_1Click(Sender: TObject);
var
  IdexA:Integer;
  ListA:TStringList;
begin
  try
    ListA:=TStringList.Create;
    ListA.Add('banana');
    ListA.Add('Apple');
    ListA.Add('banana');
    ListA.Add('Pear');
    ListA.Add('Orange');

    ListA.Sorted:=True;

    IdexA:=-1;
    ListA.Find('banana',IdexA);
    ShowMessageFmt('%D',[IdexA]);
  finally
    FreeAndNil(ListA);
  end;
end;

相关阅读 >>

Delphi webbrowser1 读取当前页面字体大小

Delphi 延迟时间函数

Delphi fmx自定义对话框样式,多屏幕布局

Delphi设置ie代理的方法

Delphi通过spcomm com口发短信包括pud编码解码

Delphi安卓创建pdf文件并打开

Delphi sysutils.strcopy、sysutils.strecopy

Delphi xe4 for ios 谨慎处理字符串

Delphi网络英汉字典代码

Delphi xe7的android应用取得wi-fi的信息

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



打赏

取消

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

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

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

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

评论

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