delphi String转换成TStrings


本文整理自网络,侵删。

 

function StringsToStr(const vList:TStrings):string;
var
  i:Integer;
begin
  Result := '';
  for i:=0 to vList.Count-1 do
  begin
    if Result <> '' then
      Result := Result+'#'+vList.Strings[i]
    else
      Result := vList.Strings[i];
  end;
end;

//String转换成TStrings
function StrToStrings(const Str:string;var vList:TStrings):Integer;
begin
  Result := ExtractStrings(['#'],[' '],PChar(str),vList);
end;

相关阅读 >>

Delphi 让窗体自适应屏幕显示

Delphi根据不同分隔符获取字符串内容

Delphi中判断操作系统是否是windows7

Delphi 结构体的使用、tbitmap和tmemorystream的转换

Delphi memo 过滤重复字符 indexof

Delphi 获取webbrowser中的图片

Delphi 截取两个字符之间的内容

Delphi多线程

Delphi中httpencode使用注意事项

Delphi 用 directshow 获取本机的视频摄像设备列表

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



打赏

取消

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

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

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

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

评论

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