试试看TStrings的CommaText
摘自Delphi帮助文件
property CommaText: string;
Description
Use CommaText to get or set all the strings in the TStrings object in a single
comma-delimited string.
When retrieving CommaText, any string in the list that include spaces, commas
or quotes will be contained in double quotes, and any double quotes in
a string will be repeated. For example, if the list contains the following
strings:
Stri,ng 1
Stri"ng 2
String 3
String4
CommaText will return:
"Stri,ng 1","Stri""ng 2","String 3",String4
When assigning CommaText, the value is parsed as SDF formatted text.
For SDF format, strings are separated by commas or spaces, and optionally
enclosed in double quotes. Double quote marks that are part of the string
are repeated to distinguish them from the quotes that surround the string.
Spaces and commas that are not contained within double quote marks are delimiters.
Two commas next to each other will indicate an empty string, but spaces that
appear next to another delimiter are ignored. For example, suppose CommaText is
set to:
"Stri,ng 1", "Stri""ng 2" , String 3,String4
The list will then contain:
Stri,ng 1
Stri"ng 2
String
3
String4