Show: Object Pascal C++
Display Preferences

Accessing a Particular String

From Appmethod Topics
Jump to: navigation, search

Go Up to Manipulating Strings in a List

The Strings array property contains the strings in the list, referenced by a zero-based index:


StringList1->Strings[0] = “This is the first string.”;

Because Strings is the default property for string lists, you can omit the Strings identifier when accessing the list; thus

Object Pascal:

 StringList1.Strings[0] := 'This is the first string.';

is equivalent to

Object Pascal:

 StringList1[0] := 'This is the first string.';

See Also

Personal tools
In other languages