本文整理自网络,侵删。
以前一直是自已写函数处理,没想到Delphi有一个自带的。
ExtractStrings:用指定的分割符分割一个字符串为多个子字符串
给你一个例子
var
S: string;
SL: TStringList;
begin
S := '123,456,789 ';
SL := TStringList.Create;
ExtractStrings([ ', '], [], PChar(S), SL);
ShowMessage(SL.Text);
SL.Free;
end;
相关阅读 >>
Delphi tmsweb core webhttprequest1提交json数据
Delphi 中 findwindow 和 findwindowex 的语法和用法
Delphi tstreamreader 和tstreamwriter
更多相关阅读请进入《Delphi》频道 >>