TStringList.CommaText

From Soldat Community Wiki
Revision as of 17:55, 24 August 2013 by Mighty (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
property CommaText: String
 Access mode: RW

Description

CommaText represents the stringlist as a single string, consisting of a comma-separated concatenation of the strings in the list.

Reading

If one of the strings contains spaces, comma's or quotes it will be enclosed by double quotes. Any double quotes in a string will be doubled. For instance the following strings:

Comma,string
Quote"string
Space string
NormalSttring

is converted to

"Comma,string","Quote""String","Space string",NormalString

Writing

Conversely, when setting the CommaText property, the text will be parsed according to the rules outlined above, and the strings will be set accordingly.
Note that spaces will in this context be regarded as string separators, unless the string as a whole is contained in double quotes. Spaces that occur next to a delimiter will be ignored.
The following string:

"Comma,string" , "Quote""String",Space string,, NormalString

Will be converted to

Comma,String
Quote"String
Space
String

NormalString