本文整理自网络,侵删。
//将Strings合并成一个逗号分隔的字符串,用于SQLfunction GetStrFromStrings(tmpItems:TStrings):String;var icnt:integer; str,stemp:string;begin str:=''; for icnt:=0 to tmpItems.Count -1 do begin stemp:=trim(tmpItems[icnt]); if stemp<>'' then str:=str+''''+stemp+''','; end; str:=copy(str,1,length(str)-1); result:=str;end;
procedure TForm1.Button1Click(Sender: TObject);beginMemo2.Text:=GetStrFromStrings(Memo1.Lines);end;
相关阅读 >>
Delphi winapi: shellexecute - 打开外部程序或文件
Delphi idhttp中application/x-www-form-urlencoded字符说明
更多相关阅读请进入《Delphi》频道 >>