

Same as IndexOf but used with sorted string lists. Gets the index position of the first name/value pair string where the name matches the given string. Gets the index position of the first string matching the given string. Swaps two strings in the list, as identified by their index positions. Moves a string from one index position to another, shifting other strings around as appropriate. Position 0 will force an insert at the start.

Inserts a string at the given index position. Will add the given string to the list, returning its allocated index position (starting with 0).Īs Add but does not return the index value. Returns the object associated with the string at the given index, if present. When true all strings added will into a sorted sequence. You should of course set this property to the desired value before adding strings. This property may have one of the following TDuplicates enumeration values: When true, Delphi treats strings as mixed case when perforing certain operations, such as Sort. Returns the value by string index (starting at 0) when using name/value pairs. Returns the value for a given name when using name/value pair strings (see above). See the Value and ValueFromIndex properties, and the IndexOfName method. Each string must have no embedded blanks, and contain an embedded = sign (or whatever the current NameValueSeparator variable is).
#Free pascal tstrings.addstrings code
Strings in a string list can be treated as name/value pairs, as in the second code example. Used to separate strings when using DelimitedText. Used to enclose strings that have embedded blanks when using DelimitedText. Strings containing embedded blanks must be enclosed in the QuoteChar (default is "). This string will have the list strings separated by the Delimiter value (default is a comma). When getting, if a string contains embedded spaces, it will be enclosed in double quote marks. This is useful for loading from a text spreadsheet export. This string will have the list strings separated by commas. Useful for loading from a visual object that can hold multiple lines of text. This string will have each string terminated with a carriage return and line feed combination (CRLF).

This means that you can use it without specifying its name: Note that the Strings property is the default property.
#Free pascal tstrings.addstrings update
Get or update the string at a given index in the list (the first list item has index 0). You would manage this capacity for performance reasons. Set or get the current capacity of the string list. Returns the number of strings in the list We'll cover the main properties and methods of TStringList, including those derived from TStrings TStringList implements these abstract methods (Clear, Delete and Insert). Whilst you can use TStrings, it is not recommended since it is incomplete - some of the methods are abstract. The list can be built string by string, or loaded from a comma separated big string, or even from a text file. Items in a string list may be inserted, moved and sorted. It is extremely useful for many kinds of list processing. Smart Pascal : TStringList command Smart Pascal
