本文整理自网络,侵删。
function Join(mylist: TStrings; seperatorStr: string): string;var i: Integer;begin Result := string.Empty; for i := 0 to mylist.Count - 1 do begin Result := Result + mylist[i]; if i < mylist.Count - 1 then Result := Result + ' ' + seperatorStr + ' '; end;end;
procedure TForm1.Button1Click(Sender: TObject);beginmemo2.Text:=Join(memo1.Lines,edit1.Text);end;

相关阅读 >>
Delphi 颜色转换函数: 从 Delphi 到 html
Delphi xe firemonkey的stylebook皮肤控件的使用
Delphi if语法,弹出提示框,不等于写法,判断是否为空
更多相关阅读请进入《Delphi》频道 >>