Docs: LazUtils. Adds missing topics or content.

(cherry picked from commit 655bd2ba0d)
This commit is contained in:
dsiders 2021-09-04 19:04:59 +01:00 committed by Maxim Ganetsky
parent 039d4c3cc2
commit f60dddd9d9
4 changed files with 327 additions and 84 deletions

View File

@ -93,7 +93,7 @@
</element> </element>
<!-- function type Visibility: default --> <!-- function type Visibility: default -->
<element name="TOwnerHashFunction"> <element name="TOwnerHashFunction">
<short/> <short>Defines a hash function implemented as an object procedure.</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
@ -107,8 +107,14 @@
</element> </element>
<!-- function type Visibility: default --> <!-- function type Visibility: default -->
<element name="TOnGetKeyForHashItem"> <element name="TOnGetKeyForHashItem">
<short/> <short>
<descr/> Defines a Pointer function type used to get the key value for a hash item in TDynHashArray.
</short>
<descr>
<p>
TOnGetKeyForHashItem is the type used for the OnGetKeyForHashItem property in TDynHashArray.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- function result Visibility: default --> <!-- function result Visibility: default -->
@ -119,15 +125,35 @@
<element name="TOnGetKeyForHashItem.Item"> <element name="TOnGetKeyForHashItem.Item">
<short/> <short/>
</element> </element>
<element name="TOnEachHashItem">
<short>
Defines a Boolean function type used to enumerate hash items in TDynHashArray.
</short>
<descr/>
<seealso/>
</element>
<element name="TOnEachHashItem.Result">
<short/>
</element>
<element name="TOnEachHashItem.Sender">
<short/>
</element>
<element name="TOnEachHashItem.Item">
<short/>
</element>
<!-- pointer type Visibility: default --> <!-- pointer type Visibility: default -->
<element name="PDynHashArrayItem"> <element name="PDynHashArrayItem">
<short/> <short>Pointer to a TDynHashArrayItem instance.</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<!-- record type Visibility: default --> <!-- record type Visibility: default -->
<element name="TDynHashArrayItem"> <element name="TDynHashArrayItem">
<short/> <short>
Record type with pointers to the current, previous, and next has items in a linked list.
</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
@ -171,15 +197,44 @@
</element> </element>
<!-- set type Visibility: default --> <!-- set type Visibility: default -->
<element name="TDynHashArrayOptions"> <element name="TDynHashArrayOptions">
<short/> <short>Set type used to store values from TDynHashArrayOption.</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<!-- object Visibility: default --> <!-- object Visibility: default -->
<element name="TDynHashArray"> <element name="TDynHashArray">
<short>Name of the class that store all functions and data for an hashed array.</short> <short>Name of the class that store all functions and data for an hashed array.</short>
<descr/> <descr>
<errors/> <p>
TDynHashArray is a class which is similar to TList which allows both pointers and objects to be maintained in its internal storage. It includes common methods like Add, Remove, Contains, First, Count and Clear. Because of its hashing nature, the add, remove, and find operations are done in constant time on average.
</p>
<p>
<b>Inner structure:</b>
</p>
<p>
There are three parts:
</p>
<ol>
<li>
The array itself (FItems). Every entry is a pointer to the first TDynHashArrayItem of a list with the same hash index. The first item of every same index list is the list beginning and its IsOverflow flag is set to false. All other items are overflow items. To get all items with the same hash index, do a FindHashItem. Then search through all "Next" items until Next is nil or its IsOverflow flag is set to false.
</li>
<li>
The items beginning with FFirstItem is a 2-way-connected list of
TDynHashArrayItem. This list contains all used items.
</li>
<li>To reduce GetMem/FreeMem calls, free items are cached.</li>
</ol>
<p>
<b>Issues:</b>
</p>
<p>
The maximum capacity is the PrimeNumber. You can store more items, but the
performance decreases. The best idea is to provide your own hash function.
</p>
<p>
<b>Important</b>: Items in the TDynHashArray must not change their key. When changing the key of an item, remove it and add it after the change.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- variable Visibility: private --> <!-- variable Visibility: private -->
@ -203,13 +258,21 @@
<!-- variable Visibility: private --> <!-- variable Visibility: private -->
<element name="TDynHashArray.FMinCapacity"> <element name="TDynHashArray.FMinCapacity">
<short>The minimum number of items that will be allocated for an array.</short> <short>The minimum number of items that will be allocated for an array.</short>
<descr>The size of the array can be changed anytime. However, even if a size is given by FCapacity is smaller than this minimum number, then this minimum number of items will be allocated. This is done for efficiency and speed.</descr> <descr>
<p>
The size of the array can be changed anytime. However, even if a size is given by FCapacity is smaller than this minimum number, then this minimum number of items will be allocated. This is done for efficiency and speed.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- variable Visibility: private --> <!-- variable Visibility: private -->
<element name="TDynHashArray.FMaxCapacity"> <element name="TDynHashArray.FMaxCapacity">
<short>The size of the array cannot be larger than this number.</short> <short>The size of the array cannot be larger than this number.</short>
<descr>FCapacity is overridden by this number, if that is larger than this.</descr> <descr>
<p>
FCapacity is overridden by this number, if that is larger than this.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- variable Visibility: private --> <!-- variable Visibility: private -->
@ -233,13 +296,21 @@
<!-- variable Visibility: private --> <!-- variable Visibility: private -->
<element name="TDynHashArray.FLowWaterMark"> <element name="TDynHashArray.FLowWaterMark">
<short>The lower element limit for reallocation.</short> <short>The lower element limit for reallocation.</short>
<descr>The number of elements allocated are halved if the number of elements in the array goes below this number.</descr> <descr>
<p>
The number of elements allocated are halved if the number of elements in the array goes below this number.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- variable Visibility: private --> <!-- variable Visibility: private -->
<element name="TDynHashArray.FHighWaterMark"> <element name="TDynHashArray.FHighWaterMark">
<short>The upper element count limit for reallocation.</short> <short>The upper element count limit for reallocation.</short>
<descr>The number of elements allocated are doubled if the number of elements in the array reaches this number.</descr> <descr>
<p>
The number of elements allocated are doubled if the number of elements in the array reaches this number.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- variable Visibility: private --> <!-- variable Visibility: private -->
@ -315,7 +386,11 @@
<!-- procedure Visibility: private --> <!-- procedure Visibility: private -->
<element name="TDynHashArray.SetCustomHashFunction"> <element name="TDynHashArray.SetCustomHashFunction">
<short>Specify your own hash function to be used by the class.</short> <short>Specify your own hash function to be used by the class.</short>
<descr>The hash function has to convert a string into a number in a random fashion.</descr> <descr>
<p>
The hash function has to convert a string into a number in a random fashion.
</p>
</descr>
<errors/> <errors/>
<seealso/> <seealso/>
</element> </element>
@ -359,7 +434,11 @@
<!-- procedure Visibility: protected --> <!-- procedure Visibility: protected -->
<element name="TDynHashArray.RebuildItems"> <element name="TDynHashArray.RebuildItems">
<short>Rebuilds the internal data structures.</short> <short>Rebuilds the internal data structures.</short>
<descr>It is called anytime when there is a change that makes it necessary. E.g. hash function changes or because of dynamic reallocation.</descr> <descr>
<p>
It is called anytime when there is a change that makes it necessary. E.g. hash function changes or because of dynamic reallocation.
</p>
</descr>
<errors/> <errors/>
<seealso/> <seealso/>
</element> </element>
@ -380,26 +459,44 @@
</element> </element>
<!-- constructor Visibility: public --> <!-- constructor Visibility: public -->
<element name="TDynHashArray.Create"> <element name="TDynHashArray.Create">
<short/> <short>Constructor for the class instance.</short>
<descr/> <descr>
<p>
Create is the overloaded constructor for the class instance. Overloaded variants are provided which set the initial value in MinCapacity to either a default or a user-specified value. The parameterless version sets the initial value in MinCapacity to 10, but it is automagically increased to 137.
</p>
<p>
MaxCapacity is set to an arbitrarily large prime number defined in the implementation for class.
</p>
<p>
Create allocates memory needed to store the number of TDynHashArrayItem entries specified in its Capacity property. The allocated memory is zero-filled prior to use.
</p>
</descr>
<errors/> <errors/>
<seealso/> <seealso/>
</element> </element>
<!-- argument Visibility: default --> <!-- argument Visibility: default -->
<element name="TDynHashArray.Create.InitialMinCapacity"> <element name="TDynHashArray.Create.InitialMinCapacity">
<short/> <short>Initial value used as the minimum capacity for the class instance.</short>
</element> </element>
<!-- destructor Visibility: public --> <!-- destructor Visibility: public -->
<element name="TDynHashArray.Destroy"> <element name="TDynHashArray.Destroy">
<short/> <short>Destructor for the class instance.</short>
<descr/> <descr>
<errors/> <p>
<seealso/> Destroy is the overridden destructor for the class instance. It calls the Clear method to remove cache entries for the list, and to free the pointers to the TDynHashArrayItem entries starting at FirstHashItem.
</p>
</descr>
<seealso>
<link id="TDynHashArray.FirstHashItem"/>
<link id="TDynHashArray.Clear"/>
<link id="TDynHashArray.ClearCache"/>
</seealso>
</element> </element>
<!-- procedure Visibility: public --> <!-- procedure Visibility: public -->
<element name="TDynHashArray.Add"> <element name="TDynHashArray.Add">
<short>Adds an item to the set/array.</short> <short>Adds an item to the set/array.</short>
<descr><p>An example:</p><code>uses <descr><p>An example:</p>
<code>uses
{$IFDEF UNIX}{$IFDEF UseCThreads} {$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads, cthreads,
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
@ -409,19 +506,19 @@ var
A:TDynHashArray; A:TDynHashArray;
s:pchar; s:pchar;
begin begin
A:=TDynHashArray.Create; A := TDynHashArray.Create;
s:=StrNew ('u'); s := StrNew ('u');
A.Add(s); A.Add(s);
if A.Contains(s) then if A.Contains(s) then
writeln('1:it contains s.'); writeln('1:it contains s.');
writeln('1:count:',A.Count); writeln('1:count:',A.Count);
A.Clear; A.Clear;
if A.Contains(s) then if A.Contains(s) then
writeln('2:it contains s.'); writeln('2:it contains s.');
writeln('2:count:',A.Count); writeln('2:count:',A.Count);
ReadLn; ReadLn;
StrDispose(s); </code> StrDispose(s);</code>
</descr> </descr>
<errors/> <errors/>
<seealso/> <seealso/>
@ -433,29 +530,31 @@ StrDispose(s); </code>
<!-- function Visibility: public --> <!-- function Visibility: public -->
<element name="TDynHashArray.Contains"> <element name="TDynHashArray.Contains">
<short>Returns true if the item is in the set.</short> <short>Returns true if the item is in the set.</short>
<descr><p>An example:</p><code>uses <descr>
<p>An example:</p>
<code>uses
{$IFDEF UNIX}{$IFDEF UseCThreads} {$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads, cthreads,
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
Classes, dynhasharray,strings; Classes, dynhasharray,strings;
var var
A:TDynHashArray; A: TDynHashArray;
s:pchar; s: pchar;
begin begin
A:=TDynHashArray.Create; A := TDynHashArray.Create;
s:=StrNew ('u'); s := StrNew ('u');
A.Add(s); A.Add(s);
if A.Contains(s) then if A.Contains(s) then
writeln('1:it contains s.'); writeln('1:it contains s.');
writeln('1:count:',A.Count); writeln('1:count:',A.Count);
A.Clear; A.Clear;
if A.Contains(s) then if A.Contains(s) then
writeln('2:it contains s.'); writeln('2:it contains s.');
writeln('2:count:',A.Count); writeln('2:count:',A.Count);
ReadLn; ReadLn;
StrDispose(s); </code> StrDispose(s);</code>
</descr> </descr>
<errors/> <errors/>
<seealso/> <seealso/>
@ -486,7 +585,9 @@ StrDispose(s); </code>
<!-- procedure Visibility: public --> <!-- procedure Visibility: public -->
<element name="TDynHashArray.Remove"> <element name="TDynHashArray.Remove">
<short>Removes an element from the set/hash array.</short> <short>Removes an element from the set/hash array.</short>
<descr><p>An example:</p><code>{$mode objfpc}{$H+} <descr>
<p>An example:</p>
<code>{$mode objfpc}{$H+}
uses uses
{$IFDEF UNIX}{$IFDEF UseCThreads} {$IFDEF UNIX}{$IFDEF UseCThreads}
@ -526,7 +627,9 @@ end.
<!-- procedure Visibility: public --> <!-- procedure Visibility: public -->
<element name="TDynHashArray.Clear"> <element name="TDynHashArray.Clear">
<short>Removes all elements from the set/hash array.</short> <short>Removes all elements from the set/hash array.</short>
<descr><p>An example:</p><code>uses <descr>
<p>An example:</p>
<code>uses
{$IFDEF UNIX}{$IFDEF UseCThreads} {$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads, cthreads,
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
@ -710,6 +813,16 @@ StrDispose(s); </code>
<element name="TDynHashArray.AssignTo.List"> <element name="TDynHashArray.AssignTo.List">
<short/> <short/>
</element> </element>
<element name="TDynHashArray.ForEach">
<short>Calls the specified function for each of the items in the hash array.</short>
<descr/>
<seealso/>
</element>
<element name="TDynHashArray.ForEach.Func">
<short>Boolean function type called for the hash items.</short>
</element>
<!-- function Visibility: public --> <!-- function Visibility: public -->
<element name="TDynHashArray.SlowAlternativeHashMethod"> <element name="TDynHashArray.SlowAlternativeHashMethod">
<short>Another hash function that can be used.</short> <short>Another hash function that can be used.</short>
@ -751,14 +864,20 @@ StrDispose(s); </code>
</element> </element>
<!-- property Visibility: public --> <!-- property Visibility: public -->
<element name="TDynHashArray.FirstHashItem"> <element name="TDynHashArray.FirstHashItem">
<short/> <short>
Pointer which provides access to the first TDynHashArrayItem stored in the hash array.
</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<!-- property Visibility: public --> <!-- property Visibility: public -->
<element name="TDynHashArray.MinCapacity"> <element name="TDynHashArray.MinCapacity">
<short>The minimum number of items that will be allocated for an array.</short> <short>The minimum number of items that will be allocated for an array.</short>
<descr>The size of the array can be changed anytime. However, even if a size is given by FCapacity is smaller than this minimum number, then this minimum number of items will be allocated. This is done for efficiency and speed.</descr> <descr>
<p>
The size of the array can be changed at any time. However, even if a size is given for Capacity that is smaller than this minimum number, then this minimum number of items will be allocated. This is done for efficiency and speed.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- property Visibility: public --> <!-- property Visibility: public -->
@ -788,21 +907,23 @@ StrDispose(s); </code>
<!-- property Visibility: public --> <!-- property Visibility: public -->
<element name="TDynHashArray.OnGetKeyForHashItem"> <element name="TDynHashArray.OnGetKeyForHashItem">
<short>User-defined function to obtain a key from an item.</short> <short>User-defined function to obtain a key from an item.</short>
<descr>If this function is specified,then it is possible to use this class as <descr>
an associative array. Otherwise, it implements a set.</descr> <p>
If this function is specified,then it is possible to use this class as an associative array. Otherwise, it implements a set.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- property Visibility: public --> <!-- property Visibility: public -->
<element name="TDynHashArray.Options"> <element name="TDynHashArray.Options">
<short/> <short>Set of TDynHashArrayOption values enabled for the class instance.</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<!-- object Visibility: default --> <!-- object Visibility: default -->
<element name="TDynHashArrayItemMemManager"> <element name="TDynHashArrayItemMemManager">
<short/> <short>Custom memory manager for TDynHashArrayItem instances.</short>
<descr/> <descr/>
<errors/>
<seealso/> <seealso/>
</element> </element>
<!-- variable Visibility: private --> <!-- variable Visibility: private -->
@ -866,7 +987,9 @@ StrDispose(s); </code>
</element> </element>
<!-- procedure Visibility: public --> <!-- procedure Visibility: public -->
<element name="TDynHashArrayItemMemManager.DisposeItem"> <element name="TDynHashArrayItemMemManager.DisposeItem">
<short/> <short>
Removes references to the specified hash item and adds it to the free list.
</short>
<descr/> <descr/>
<errors/> <errors/>
<seealso/> <seealso/>
@ -877,7 +1000,7 @@ StrDispose(s); </code>
</element> </element>
<!-- function Visibility: public --> <!-- function Visibility: public -->
<element name="TDynHashArrayItemMemManager.NewItem"> <element name="TDynHashArrayItemMemManager.NewItem">
<short/> <short>Allocates and initializes a new hash item for the memory manager.</short>
<descr/> <descr/>
<errors/> <errors/>
<seealso/> <seealso/>
@ -888,46 +1011,52 @@ StrDispose(s); </code>
</element> </element>
<!-- property Visibility: public --> <!-- property Visibility: public -->
<element name="TDynHashArrayItemMemManager.MinimumFreeCount"> <element name="TDynHashArrayItemMemManager.MinimumFreeCount">
<short/> <short>Minimum size for the internal free list storage.</short>
<descr/> <descr>
<p>
Ensures that MinimumFreeCount cannot be set to a negative value.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- property Visibility: public --> <!-- property Visibility: public -->
<element name="TDynHashArrayItemMemManager.MaximumFreeRatio"> <element name="TDynHashArrayItemMemManager.MaximumFreeRatio">
<short/> <short>Threshold at which items in the free list are released.</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<!-- property Visibility: public --> <!-- property Visibility: public -->
<element name="TDynHashArrayItemMemManager.Count"> <element name="TDynHashArrayItemMemManager.Count">
<short/> <short>Number of hash items allocated by the memory manager.</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<!-- procedure Visibility: public --> <!-- procedure Visibility: public -->
<element name="TDynHashArrayItemMemManager.Clear"> <element name="TDynHashArrayItemMemManager.Clear">
<short/> <short>Disposes of hash items in the free list.</short>
<descr/> <descr/>
<errors/> <errors/>
<seealso/> <seealso/>
</element> </element>
<!-- constructor Visibility: public --> <!-- constructor Visibility: public -->
<element name="TDynHashArrayItemMemManager.Create"> <element name="TDynHashArrayItemMemManager.Create">
<short/> <short>Constructor for the class instance.</short>
<descr/> <descr/>
<errors/> <errors/>
<seealso/> <seealso/>
</element> </element>
<!-- destructor Visibility: public --> <!-- destructor Visibility: public -->
<element name="TDynHashArrayItemMemManager.Destroy"> <element name="TDynHashArrayItemMemManager.Destroy">
<short/> <short>Destructor for the class instance.</short>
<descr/> <descr/>
<errors/> <errors/>
<seealso/> <seealso/>
</element> </element>
<!-- function Visibility: public --> <!-- function Visibility: public -->
<element name="TDynHashArrayItemMemManager.ConsistencyCheck"> <element name="TDynHashArrayItemMemManager.ConsistencyCheck">
<short/> <short>
Ensures that Count mataches the actual number of entries in the free list.
</short>
<descr/> <descr/>
<errors/> <errors/>
<seealso/> <seealso/>

View File

@ -231,6 +231,27 @@
<short>Method to locate in the items for the list.</short> <short>Method to locate in the items for the list.</short>
</element> </element>
<element name="TMethodList.Assign">
<short>Copies property values from Source into the current class instance.</short>
<descr>
<p>
<var>Assign</var> is an overridden method in <var>TMethodList</var> used to implement object persistence for the TMethodList class type. Assign calls <var>Clear</var> ro reallocate memory for the <var>Items</var> in the class instance. Values from the Items property in <var>Source</var> are added to the current class instance.
</p>
</descr>
<seealso/>
</element>
<element name="TMethodList.Assign.Source">
<short>TMethodList instance with values copied in the method.</short>
</element>
<element name="TMethodList.Clear">
<short>
Clears the values in Items by Reallocating memory for the property with a length of 0 bytes.
</short>
<descr/>
<seealso/>
</element>
<!-- procedure Visibility: public --> <!-- procedure Visibility: public -->
<element name="TMethodList.Delete"> <element name="TMethodList.Delete">
<short>Deletes the method stored at the specified position.</short> <short>Deletes the method stored at the specified position.</short>

View File

@ -766,7 +766,9 @@ end;
</element> </element>
<element name="UTF8CharStart"> <element name="UTF8CharStart">
<short/> <short>
Deprecated. Use UTF8CodepointStart instead.
</short>
<descr> <descr>
<remark> <remark>
Deprecated. Use UTF8CodepointStart instead. Deprecated. Use UTF8CodepointStart instead.
@ -812,7 +814,9 @@ end;
</element> </element>
<element name="UTF8CharToByteIndex"> <element name="UTF8CharToByteIndex">
<short/> <short>
Deprecated. Use UTF8CodepointToByteIndex instead.
</short>
<descr> <descr>
<remark> <remark>
Deprecated. Use UTF8CodepointToByteIndex instead. Deprecated. Use UTF8CodepointToByteIndex instead.
@ -946,6 +950,29 @@ end;
<short>String to search for the specified value.</short> <short>String to search for the specified value.</short>
</element> </element>
<element name="UTF8PosP">
<short>
Returns the position where SearchInText starts in SearchForText, or Nil when not found.
</short>
<descr/>
<seealso/>
</element>
<element name="UTF8PosP.Result">
<short/>
</element>
<element name="UTF8PosP.SearchForText">
<short/>
</element>
<element name="UTF8PosP.SearchForTextLen">
<short/>
</element>
<element name="UTF8PosP.SearchInText">
<short/>
</element>
<element name="UTF8PosP.SearchInTextLen">
<short/>
</element>
<element name="UTF8Copy"> <element name="UTF8Copy">
<short> <short>
Copies the specified number of codepoints from the UTF-8-encoded string. Copies the specified number of codepoints from the UTF-8-encoded string.
@ -1090,6 +1117,24 @@ end;
<short>Language code for the operation.</short> <short>Language code for the operation.</short>
</element> </element>
<element name="UTF8LowerString">
<short>
Converts the specified string to lowercase using Unicode case mapping rules.
</short>
<descr>
<p>
Calls UTF8LowerCase to get the return value for the function.
</p>
</descr>
<seealso/>
</element>
<element name="UTF8LowerString.Result">
<short>Lowercase values for the specified string.</short>
</element>
<element name="UTF8LowerString.S">
<short>String value to convert in the function.</short>
</element>
<element name="UTF8UpperCase"> <element name="UTF8UpperCase">
<short> <short>
Converts the specified string to uppercase using Unicode case mapping rules. Converts the specified string to uppercase using Unicode case mapping rules.
@ -1391,7 +1436,7 @@ end;
<short>UTF-8 codepoint used as a padding character.</short> <short>UTF-8 codepoint used as a padding character.</short>
</element> </element>
<element namer="UTF8LeftStr"> <element name="UTF8LeftStr">
<short> <short>
Gets the specified number of characters (codepoints) at the start of the string. Gets the specified number of characters (codepoints) at the start of the string.
</short> </short>
@ -1764,6 +1809,25 @@ end;
<short>Length of the second value.</short> <short>Length of the second value.</short>
</element> </element>
<element name="UTF8CompareStrP">
<short>Compares the specified PChar values.</short>
<descr>
<p>
Calls UTF8CompareStr to get the return value for the function.
</p>
</descr>
<seealso/>
</element>
<element name="UTF8CompareStrP.Result">
<short>Relative order for the compared values.</short>
</element>
<element name="UTF8CompareStrP.S1">
<short>First PChar value for the comparison.</short>
</element>
<element name="UTF8CompareStrP.S2">
<short>Second PChar value for the comparison.</short>
</element>
<element name="UTF8CompareText"> <element name="UTF8CompareText">
<short> <short>
Case-insensitive comparison of two UTF-8-encoded values. Case-insensitive comparison of two UTF-8-encoded values.
@ -1797,8 +1861,14 @@ end;
</element> </element>
<element name="UTF8CompareTextP"> <element name="UTF8CompareTextP">
<short/> <short>
<descr/> Performs a case-insensitive comparision for the specified UTF-8-encoded PChar values.
</short>
<descr>
<p>
Converts values in S1 and S2 to UnicodeString and calls WideCompareText to get the return value for the function.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<element name="UTF8CompareTextP.Result"> <element name="UTF8CompareTextP.Result">
@ -1812,7 +1882,9 @@ end;
</element> </element>
<element name="UTF8CompareLatinTextFast"> <element name="UTF8CompareLatinTextFast">
<short/> <short>
Like UTF8CompareText but does not return strict alphabetical order.
</short>
<descr> <descr>
<p> <p>
Like UTF8CompareText but does not return strict alphabetical order. The order is deterministic and good for binary search and similar uses. Optimizes comparison of single-byte encoding and also multi-byte portions when they are equal. Otherwise falls back to WideCompareText. Like UTF8CompareText but does not return strict alphabetical order. The order is deterministic and good for binary search and similar uses. Optimizes comparison of single-byte encoding and also multi-byte portions when they are equal. Otherwise falls back to WideCompareText.
@ -2295,6 +2367,17 @@ end;
<seealso/> <seealso/>
</element> </element>
<element name="ReplaceSubstring">
<short>Deprecated. Use the version in LazStringUtils instead.</short>
<descr>
<p>
Deprecated in version 2.1 To be removed in versions after 2.2.
</p>
</descr>
<seealso/>
</element>
<element name="UTF8GetStandardCodePage"> <element name="UTF8GetStandardCodePage">
<short>Gets the default system code page for the wide string manager.</short> <short>Gets the default system code page for the wide string manager.</short>
<descr> <descr>

View File

@ -71,6 +71,16 @@
<seealso/> <seealso/>
</element> </element>
<element name="TUtf8Char">
<short>Alias for the String type used for a UTF-8-encoded character.</short>
<descr>
<p>
TUtf8Char is an alias for a String type with a length of 7 bytes. A UTF-8-encoded character value may need as many as 7 bytes to represent a given codepoint in the encoding.
</p>
</descr>
<seealso/>
</element>
<element name="EMaskError"> <element name="EMaskError">
<short>Exception raised for an invalid character in TMask.</short> <short>Exception raised for an invalid character in TMask.</short>
<descr> <descr>