Sign in Join
FPDoc Onlineexperiment

TNamedCollection.IndexOfName function

Member of TNamedCollectionpublicIn unit fpMkUnit

Find index of item by name

Declaration

pascal
function IndexOfName(const AName: string): Integer

Arguments

AName

Name to search for

Function result

Index of found item or -1 if not found

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.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.