Sign in Join
FPDoc Onlineexperiment

TStringList class

In unit Classes

Standard implementation of the TStrings class.

Declaration

pascal
TStringList = class(TStrings)

Inheritance

  1. TStringList
  2. TStrings
  3. TPersistent
  4. TObject

Descends from it: TCoffStringTable TExtendedStringList THashedStringList TLookupStringList TParseStringList TShortCutList TStringListUTF8Fast TValueListStrings

Description

TStringList is a descendant class of TStrings that implements all of the abstract methods introduced there. It also introduces some additional methods:

  • Sort the list, or keep the list sorted at all times
  • Special handling of duplicates in sorted lists
  • Notification of changes in the list

See also

Properties

DuplicatespublicDescribes the behaviour of a sorted list with respect to duplicate strings.
SortedpublicDetermines whether the list is sorted or not.
CaseSensitivepublicIndicates whether comparing strings happens in a case sensitive manner.
OwnsObjectspublicDetermines whether the stringlist owns it's objects or not.
SortStylepublicSort style for strings.

Methods

CheckIndexprotected
ExchangeItemsprotected
ChangedprotectedCalled when the list of strings was modified.
ChangingprotectedCalled when the list is changing.
GetprotectedOverrides the standard read handler for the property.
GetCapacityprotectedOverrides the standard read handler for the property.
GetCountprotectedOverrides the standard read handler for the property.
GetObjectprotectedOverrides the standard read handler for the property.
PutprotectedOverrides the standard write handler for the property.
PutObjectprotectedOverrides the standard write handler for the property.
SetCapacityprotectedOverrides the standard write handler for the property.
SetUpdateStateprotectedOverrides the standard call.
InsertItemprotected
DoCompareTextprotected
DoAddObjectprotected
CreatepublicInitializ a new TStrings instance.
DestroypublicDestroys the stringlist.
AddpublicImplements the function.
AddObjectpublicAdd a string and associated object to the list.
ClearpublicImplements the function.
DeletepublicImplements the function.
ExchangepublicImplements the function.
FindpublicLocates the index for a given string in sorted lists.
IndexOfpublicOverrides the property.
InsertpublicOverrides the method.
SortpublicSorts the strings in the list.
CustomSortpublicSort the stringlist using a custom sort algorithm.

Events

OnChangepublicEvent triggered after the list was modified.
OnChangingpublicEvent triggered when the list is about to be modified.

Inherited

From TStrings (78)

AddCommaText AddDelimitedtext AddPair AddStrings AddText AlwaysQuote Append Assign BeginUpdate Capacity CheckSpecialChars CommaText CompareStrings Contains ContainsName ContainsObject Count DefaultEncoding DefineProperties DelimitedText Delimiter Encoding EndUpdate Equals Error ExtractName Fill Filter ForEach GetDelimitedText GetEnumerator GetNameValue GetNextLine GetNextLinebreak GetText GetTextStr GetValueFromIndex IndexOfName IndexOfObject InsertObject LastIndexOf LineBreak LoadFromFile LoadFromStream Map MissingNameValueSeparatorAction Move Names NameValueSeparator Objects Options Pop QuoteChar Reduce Reverse SaveToFile SaveToStream SetDelimitedText SetStrings SetText SetTextStr SetValueFromIndex Shift SkipLastLineBreak Slice StrictDelimiter Strings StringsAdapter Text TextLineBreakStyle ToObjectArray ToStringArray TrailingLineBreak UpdateCount UseLocale ValueFromIndex Values WriteBOM

From TPersistent (6)

AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers GetNamePath GetOwner

From TObject (39)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.