[Overview][Types][Procedures and functions][Variables][Index] Reference for unit 'LazUtilities' (#lazutils)

CreateFirstIdentifier

Gets the name for the first identifier represented by the value specified in Identifier.

Declaration

Source position: lazutilities.pas line 39

function CreateFirstIdentifier(

  const Identifier: string

):string;

Arguments

Identifier

  

Name for an identifier used as the base name in the generated value.

Function result

First identifier name for the value specified in Identifier.

Description

CreateFirstIdentifier removes any numeric characters found at the end of Identifier, and replaces them with the value '1'.

For example:

AIdent := CreateFirstIdentifier('Edit9');
// AIdent = 'Edit1'

CreateFirstIdentifier is used to implement code macros, key mappings, and menu items in the Lazarus IDE.

Use CreateNextIdentifier to get the next name for a specified identifier value.

Version info

Added in LazUtils version 4.0. Replaces the CreateFirstIdentifier routine in the lclproc.pas unit (LCL).

See also

CreateNextIdentifier

  

Gets the name for the next identifier following the value specified in Identifier.


Version 4.0 Generated 2025-05-03 Home