delphi 字符串的分割


本文整理自网络,侵删。

  C#
**************
string strList='A,B,C,D';
string[] strArray=strList.Split(new Char[]{','});
//这里strArray里有4个元素,各自分别为:'A' , 'B' , 'C' , 'D'。

Delphi
**************
procedure StringSplit(const Delimiter : char; Input : string; const Strings : TStrings);
begin
  Assert(Assigned(Strings));
  Strings.Clear;
  Strings.Delimiter := Delimiter;
  Strings.DelimitedText := Input;
end;

相关阅读 >>

Delphi 获取按键键值

Delphi 如何确定屏幕分辨率

Delphi getfilehashmd5

Delphi 2009 之 tstringbuilder 类[6]: equals

Delphi获取系统进程和路径

Delphi中interface接口的使用方法

Delphi 对比时间的函数

Delphi getmem(mystring,1024);//开辟1024个字节freemem(mystring,1024);//释放

Delphi idhttp 验证码登录

Delphi读写xml的技巧

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



打赏

取消

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

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

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

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

评论

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