mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 20:40:56 +02:00
Docs: LazUtils/lazstringutils. Updates content for LazIsValidIdent topic.
* depends on 5a1abf73
.
This commit is contained in:
parent
f47220cc47
commit
86a3ea8328
@ -22,6 +22,7 @@
|
||||
<!-- unresolved externals -->
|
||||
<element name="Classes"/>
|
||||
<element name="SysUtils"/>
|
||||
<element name="PasCodeGen"/>
|
||||
<element name="LazUTF8"/>
|
||||
<element name="LazLoggerBase"/>
|
||||
<element name="LazTracer"/>
|
||||
@ -1058,8 +1059,23 @@
|
||||
</element>
|
||||
|
||||
<element name="LazIsValidIdent">
|
||||
<short>This is a copy of IsValidIdent from FPC 3.1.</short>
|
||||
<short>This is a modified version of IsValidIdent from the FPC 3.1 FCL library.</short>
|
||||
<descr>
|
||||
<p>
|
||||
<var>LazIsValidIdent</var> is a <var>Boolean</var> function used to determine if the name specified in <var>Ident</var> contains a valid identifier name value.
|
||||
</p>
|
||||
<p>
|
||||
The return value is <b>True</b> when Ident contains a valid identifier name using the Pascal naming convention, and does not contain an unquoted reserved keyword. The <var>IsKeyword</var> method in <var>TPascalCodeGenerator</var> is used to check the value in Ident, and the return value is set to <b>False</b> if it contains one of the reserved keywords.
|
||||
</p>
|
||||
<p>
|
||||
If the value is a keyword prefixed with an Ampersand (&) character, it is "quoted' and considered a valid identifier name if the Pascal naming convention is satisfied. That naming convention requires the identifier to start with an alphabetic character in the range 'a-z', 'A-Z' or the '_' character. The other characters can be any of the alphanumeric characters. Case is not significant in the identifier name.
|
||||
</p>
|
||||
<p>
|
||||
AllowDots indicates whether Period ('.') characters are allowed in the identifier name. The default value for the argument is <b>False</b> (not allowed).
|
||||
</p>
|
||||
<p>
|
||||
StrictDots indicates whether the position of a given Period character is validated. In other words, the Period character cannot be first or last character in the identifier name. The default value for the argument is <b>False</b>, and is significant only when AllowDots is set to <b>True</b>.
|
||||
</p>
|
||||
<remark>
|
||||
Use the IsValidIdent routine from FPC 3.2.X when version 3.2 is the minimum requirement.
|
||||
</remark>
|
||||
@ -1068,10 +1084,18 @@
|
||||
<link id="#rtl.sysutils.IsValidIdent">IsValidIdent</link>
|
||||
</seealso>
|
||||
</element>
|
||||
<element name="LazIsValidIdent.Result"/>
|
||||
<element name="LazIsValidIdent.Ident"/>
|
||||
<element name="LazIsValidIdent.AllowDots"/>
|
||||
<element name="LazIsValidIdent.StrictDots"/>
|
||||
<element name="LazIsValidIdent.Result">
|
||||
<short>True if the specified value is a valid identifier name.</short>
|
||||
</element>
|
||||
<element name="LazIsValidIdent.Ident">
|
||||
<short>Identifier name examined in the routine.</short>
|
||||
</element>
|
||||
<element name="LazIsValidIdent.AllowDots">
|
||||
<short>True if period characters are allowed in the identifier name.</short>
|
||||
</element>
|
||||
<element name="LazIsValidIdent.StrictDots">
|
||||
<short>True if the position of a period character is validated.</short>
|
||||
</element>
|
||||
|
||||
<element name="MaxTextLen">
|
||||
<short>Defines the maximum length for shortened or "ellipsified" text.</short>
|
||||
|
Loading…
Reference in New Issue
Block a user