Find index of item by name
Source position: fpmkunit.pp line 361
public function TNamedCollection.IndexOfName( |
const AName: string |
):Integer; |
AName |
|
Name to search for |
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.
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.