[Overview][Types][Classes][Index] Reference for unit 'PropertyStorage' (#lcl)

TStoredValues.IndexOf

Gets the ordinal position in Items for the collection item with the specified name.

Declaration

Source position: propertystorage.pas line 78

public function TStoredValues.IndexOf(

  const AName: string

):Integer;

Arguments

AName

  

Name of the collection item to locate in the method.

Function result

Ordinal position for the collection item with the given name, or -1 when not found.

Description

IndexOf iterates over the values in the Items property to locate the TStoredValue instance with a Name property that matches the value in AName. AnsiCompareText is called to perform a case-insensitive comparison which also ignores accents in the characters.

The return value contains the ordinal position in Items where the value in AName was located, or -1 when a collection item is not found using the specified name.

See also

TStoredValues.Items

  

Provides indexed access to the TStoredValue collection items by their ordinal position.

TStoredValue.Name

  

The name for the collection item.

AnsiCompareText


Version 4.0 Generated 2025-05-03 Home