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

LazIsValidIdent (deprecated)

Deprecated. Use SysUtils.IsValidIdent in RTL instead.

Declaration

Source position: lazstringutils.pas line 114

function LazIsValidIdent(

  const Ident: string;

  AllowDots: Boolean = False;

  StrictDots: Boolean = False

):Boolean;

Arguments

Ident

  

Identifier name examined in the routine.

AllowDots

  

True if period characters are allowed in the identifier name.

StrictDots

  

True if the position of a period character is validated.

Function result

True if the specified value is a valid identifier name.

Description

LazIsValidIdent is a Boolean function used to determine if the name specified in Ident contains a valid identifier name. The identifier name can represent a Namespace, Package, Unit, Component, or a Member.

The return value is True when Ident contains a valid identifier name using the Pascal naming convention. The return value is False if Ident contains an empty string ('').

AllowDots indicates whether Period ('.') characters are allowed in the identifier name. The default value for the argument is False (not allowed).

StrictDots indicates whether a Period character in the identifier name causes name validation to restart at the next character in the identifier name. When set to False, a Period character is ignored during identifier name validation. The default value for the argument is False, and is significant only when AllowDots is set to True.

LazIsValidIdent examines each of the characters in Ident to ensure that the value uses the Pascal identifier naming convention. This requires the value to contain only alphanumeric characters or the Underscore ('_') character. It must start with an alphabetic character or the Underscore character; numeric characters cannot be used at the start of the identifier name. The remaining characters in the identifier name can be any alphanumeric character.

Case is not significant when determining the validity of an identifier name.

LazIsValidIdent is used in the implementation of various tools in the Lazarus IDE. (IDEIntf, CodeTools, BuildIntf)

Version info

Deprecated since LCL version 3.6. Use SysUtils.IsValidIdent in RTL instead.

See also

IsValidIdent


Version 4.0 Generated 2025-05-03 Home