System.Classes.TStrings.DelimitedText
Delphi
property DelimitedText: string read GetDelimitedText write SetDelimitedText;
C++
__property System::UnicodeString DelimitedText = {read=GetDelimitedText, write=SetDelimitedText};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | System.Classes.pas System.Classes.hpp |
System.Classes | TStrings |
Description
Represents all the strings in the TStrings object as a single delimited string.
Use DelimitedText to get or set all the strings in the TStrings object in a single string, separated by the character specified by the Delimiter property.
When retrieving DelimitedText, any string in the list that includes spaces or the delimiter and quotation marks characters specified in the Delimiter and QuoteChar properties will be surrounded (before and after) by the quotation mark character (QuoteChar). In addition, any QuoteChar character contained in an individual string will be repeated.
When retrieving DelimitedText, the resulting value delimits individual strings in two ways: each string is surrounded (before and after) by the quotation marks character specified by the QuoteChar property. In addition, individual strings are separated by the character specified by the Delimiter property.
When assigning DelimitedText, individual strings must be separated using Delimiter marks, and optionally enclosed in QuoteChar characters.
When assigning DelimitedText, the value is parsed as SDF formatted text. For SDF format, strings are separated by Delimiter characters or spaces, and optionally enclosed in QuoteChar characters. QuoteChar marks that are part of the string are repeated to distinguish them from the QuoteChar characters that surround the string. Spaces and Delimiter characters that are not contained within QuoteChar marks are delimiters. Two Delimiter characters next to each other will indicate an empty string, but spaces that appear next to another Delimiter character are ignored.
If StrictDelimiter is set to False, the space character is also interpreted as a delimiter, regardless of the value of Delimiter. This is not true when the space character occurs between quotation marks.
Note: CommaText is the same as the DelimitedText property when Delimiter is ',' and QuoteChar is '"'. Including a trailing Delimiter in the source string causes a blank item to be included in the string list.