Unit 'fpmkunit' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TNamedCollection.IndexOfName

Find index of item by name

Declaration

Source position: fpmkunit.pp line 361

public function TNamedCollection.IndexOfName(

  const AName: string

):Integer;

Arguments

AName

  

Name to search for

Function result

Result returns the zero-based index of the item with the specified name, or -1 if no item with that name is found in the collection. Used to determine if an item exists and locate it within the collection.

Description

Searches for an item with the specified name in the collection and returns its zero-based index. Returns -1 if no item with the given name is found.

This provides efficient name-based lookup for finding specific items in named collections.


Documentation generated on: Dec 15 2025