[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

TStrings.Strings

Indexed access to teh strings in the list.

Declaration

Source position: classesh.inc line 515

public property TStrings.Strings: String
  read Get
  write Put;
  default;

Description

Stringsis the default property of TStrings. It provides indexed read-write access to the list of strings. Reading it will return the string at position Indexin the list. Writing it will set the string at position Index.

Indexis the position of the string in the list. It is zero-based, i.e. valued values range from 0(the first string in the list) till Count-1(the last string in the list). When browsing through the strings in the list, this fact must be taken into account.

To access the objects associated with the strings in the list, use the TStrings.Objectsproperty. The name parts of name-value pairs can be accessed with the TStrings.Namesproperty, and the values can be set or read through the TStrings.Valuesproperty.

Searching through the list can be done using the TStrings.IndexOfmethod.

Errors

If Indexis outside the allowed range, an EStringListErrorexception is raised.

See also

TStrings.Count

  

Number of strings in the list.

TStrings.Objects

  

Indexed access to the objects associated with the strings in the list.

TStrings.Names

  

Name parts of the name-value pairs in the list.

TStrings.Values

  

Value parts of the name-value pairs in the list.

TStrings.IndexOf

  

Find a string in the list and return its position.