[Overview][Classes][Procedures and functions][Index] Reference for unit 'LookupStringList' (#lazutils)

TLookupStringList.Add

Adds the specified value to the Strings in the list.

Declaration

Source position: lookupstringlist.pas line 50

public function TLookupStringList.Add(

  const S: string

):Integer; override;

Arguments

S

  

Value to add to the Strings in the list.

Function result

Ordinal position for the new value, or -1 when duplicates are not allowed.

Description

Add is an overridden Integer function used to enforce handling of Duplicates when adding the specified value to Strings. Add checks the values in Sorted and Duplicates to see if duplicates are allowed in the unsorted string list.

The return value is -1 if the value in S already exists in the string map, and no actions are performed in the method. Otherwise, the inherited Add method is called to store the value in S. The return value is the position in Strings where the new value was stored.

See also

TStringList.Add


Version 4.0 Generated 2025-05-03 Home