Skip to content

TNamedCollection.IndexOfName

Find index of item by name

Declaration

Source position: fpmkunit.pp line 363

public 
function TNamedCollection.IndexOfName(const AName: string) : Integer;

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.