Docs: LazUtils/lazutf16. Adds missing topic content.

(cherry picked from commit fef0dc5f9f)
This commit is contained in:
dsiders 2023-10-28 23:59:31 +01:00
parent fa0faf12c9
commit b223ad8767

View File

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<fpdoc-descriptions> <fpdoc-descriptions>
<package name="lazutils"> <package name="lazutils">
<!-- <!--
==================================================================== ====================================================================
lazutf16 lazutf16
==================================================================== ====================================================================
--> -->
<module name="lazutf16"> <module name="lazutf16">
<short> <short>
Contains routines used for UTF-16 character and string operations. Contains routines used for UTF-16 character and string operations.
@ -30,7 +28,6 @@ a UTF-16 table, but it might be extended to include various UTF-16 routines.
</p> </p>
</descr> </descr>
<!-- function Visibility: default -->
<element name="UTF16CharacterLength"> <element name="UTF16CharacterLength">
<short> <short>
Gets the length of the UTF-16 character in the specified PWideChar value. Gets the length of the UTF-16 character in the specified PWideChar value.
@ -39,39 +36,45 @@ Gets the length of the UTF-16 character in the specified PWideChar value.
Uses the endian-ness for the platform. Returns 0, 1, or 2. Uses the endian-ness for the platform. Returns 0, 1, or 2.
</descr> </descr>
</element> </element>
<!-- function result Visibility: default -->
<element name="UTF16CharacterLength.Result"> <element name="UTF16CharacterLength.Result">
<short>Length of the UTF-16 character in the value, or 0 when Nil.</short> <short>Length of the UTF-16 character in the value, or 0 when Nil.</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UTF16CharacterLength.p"> <element name="UTF16CharacterLength.p">
<short>PWideChar value examined in the routine.</short> <short>PWideChar value examined in the routine.</short>
</element> </element>
<!-- function Visibility: default -->
<element name="UTF16Length"> <element name="UTF16Length">
<short>Gets the length for the specified value in UTF-16 characters.</short> <short>Gets the length for the specified value in UTF-16 characters.</short>
<descr/> <descr>
<p>
Examines 16-UTF values in the specified Unicode string until the number of word
values is exceeded. Using zero (0) in WordCount causes no actions to be
performed in the routine, and the return value is 0.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<!-- function result Visibility: default -->
<element name="UTF16Length.Result"> <element name="UTF16Length.Result">
<short></short> <short>
Number of UTF-16 codepoints in the examined value.
</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UTF16Length.s"> <element name="UTF16Length.s">
<short></short> <short>
Unicode string with the values examined in the routine.
</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UTF16Length.p"> <element name="UTF16Length.p">
<short></short> <short>
Pointer to the WideChar values examined in the routine.
</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UTF16Length.WordCount"> <element name="UTF16Length.WordCount">
<short></short> <short>
Number of UTF-16 word values to examine in the Unicode string.
</short>
</element> </element>
<!-- function Visibility: default -->
<element name="UTF16Copy"> <element name="UTF16Copy">
<short> <short>
Copies a number of UTF-16 characters at the given character position in the Copies a number of UTF-16 characters at the given character position in the
@ -96,12 +99,19 @@ specified value.
</element> </element>
<element name="UTF16CharStart"> <element name="UTF16CharStart">
<short/> <short>
Gets a pointer to the character (UTF-16 codepoint) at the specified position
(zero-based) in a WideChar value.
</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<element name="UTF16CharStart.Result"> <element name="UTF16CharStart.Result">
<short/> <short>
Pointer to the UTF-16 character at the specified position in the value, or
<b>Nil</b> if P is empty or a UTF-16 character is not found at the specified
ordinal position.
</short>
</element> </element>
<element name="UTF16CharStart.P"> <element name="UTF16CharStart.P">
<short>PWideChar value with the values examined in the routine.</short> <short>PWideChar value with the values examined in the routine.</short>
@ -177,20 +187,16 @@ when p contains an invalid UTF-16 code point.
</descr> </descr>
<seealso/> <seealso/>
</element> </element>
<!-- function result Visibility: default -->
<element name="UTF16CharacterToUnicode.Result"> <element name="UTF16CharacterToUnicode.Result">
<short>Unicode code point for the values in p.</short> <short>Unicode code point for the values in p.</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UTF16CharacterToUnicode.p"> <element name="UTF16CharacterToUnicode.p">
<short>UTF-16 code points examined and converted in the routine.</short> <short>UTF-16 code points examined and converted in the routine.</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UTF16CharacterToUnicode.CharLen"> <element name="UTF16CharacterToUnicode.CharLen">
<short>Number of UTF-16 code points for the converted character.</short> <short>Number of UTF-16 code points for the converted character.</short>
</element> </element>
<!-- function Visibility: default -->
<element name="UnicodeToUTF16"> <element name="UnicodeToUTF16">
<short> <short>
Converts a Unicode character value to its UTF-16 equivalent as a WideString Converts a Unicode character value to its UTF-16 equivalent as a WideString
@ -205,17 +211,18 @@ represent the UTF-16 code point.
</descr> </descr>
<seealso/> <seealso/>
</element> </element>
<!-- function result Visibility: default -->
<element name="UnicodeToUTF16.Result"> <element name="UnicodeToUTF16.Result">
<short>WideString value with UTF-16 code point the Unicode character.</short> <short>WideString value with UTF-16 code point the Unicode character.</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UnicodeToUTF16.u"> <element name="UnicodeToUTF16.u">
<short>Unicode character value converted in the routine.</short> <short>Unicode character value converted in the routine.</short>
</element> </element>
<element name="IsUTF16CharValid"> <element name="IsUTF16CharValid">
<short></short> <short>
Returns <b>True</b> if the specified values are a valid UTF-16 character
(codepoint).
</short>
<descr> <descr>
<p> <p>
Based on the specification defined by the Unicode consortium, at: Based on the specification defined by the Unicode consortium, at:
@ -235,19 +242,25 @@ any value in the range DC00 to DFFF not preceded by a value in the range
D800 to DBFF. [AF] D800 to DBFF. [AF]
</p> </p>
<p> <p>
Use ANextChar = #0 to indicate that there is no next char. If ANextChar is set to #0 there is no next character.
</p> </p>
</descr> </descr>
<seealso/> <seealso/>
</element> </element>
<element name="IsUTF16CharValid.Result"> <element name="IsUTF16CharValid.Result">
<short/> <short>
Returns False if AChar is #0 or AChar and ANextChar are unpaired surrogates.
</short>
</element> </element>
<element name="IsUTF16CharValid.AChar"> <element name="IsUTF16CharValid.AChar">
<short/> <short>
First UTF-16 code examined in the method.
</short>
</element> </element>
<element name="IsUTF16CharValid.ANextChar"> <element name="IsUTF16CharValid.ANextChar">
<short/> <short>
Next UTF-16 code examined in the method.
</short>
</element> </element>
<element name="IsUTF16StringValid"> <element name="IsUTF16StringValid">
@ -272,37 +285,55 @@ True if the specified WideString contains valid UTF-16 code points.
</element> </element>
<element name="Utf16StringReplace"> <element name="Utf16StringReplace">
<short/> <short>
Replaces a pattern in a Unicode string with another Unicode pattern.
</short>
<descr> <descr>
<p> <p>
Same as <var>SysUtil.StringReplace</var> but for WideStrings and Same as <var>SysUtil.StringReplace</var> but for WideStrings and
UnicodeStrings, since it's not available in FPC yet. UnicodeStrings, since it is not available in FPC yet.
</p> </p>
</descr> </descr>
<seealso/> <seealso>
<link id="#rtl.sysutils.StringReplace">StringReplace</link>
<link id="#rtl.sysutils.TReplaceFlags">TReplaceFlags</link>
</seealso>
</element> </element>
<element name="Utf16StringReplace.Result"> <element name="Utf16StringReplace.Result">
<short/> <short>
Updated value for Unicode string after pattern replacement(s).
</short>
</element> </element>
<element name="Utf16StringReplace.S"> <element name="Utf16StringReplace.S">
<short/> <short>
Unicode string value examined in the routine.
</short>
</element> </element>
<element name="Utf16StringReplace.OldPattern"> <element name="Utf16StringReplace.OldPattern">
<short/> <short>
Unicode string with the pattern to locate in S.
</short>
</element> </element>
<element name="Utf16StringReplace.NewPattern"> <element name="Utf16StringReplace.NewPattern">
<short/> <short>
Unicode string with the pattern used to replace the old pattern in S.
</short>
</element> </element>
<element name="Utf16StringReplace.Flags"> <element name="Utf16StringReplace.Flags">
<short/> <short>
Set of replacement flags applied in the routine.
</short>
</element> </element>
<element name="Utf16StringReplace.Count"> <element name="Utf16StringReplace.Count">
<short/> <short>
Number of replacements performed in the routine.
</short>
</element> </element>
<!-- function Visibility: default -->
<element name="UnicodeLowercase"> <element name="UnicodeLowercase">
<short>Converts a Unicode character value to its lowercase equivalent.</short> <short>
Converts a Unicode character value to its lowercase equivalent.
</short>
<descr> <descr>
<p> <p>
Uses internal tables to map Unicode character ranges common to both UTF-16 Uses internal tables to map Unicode character ranges common to both UTF-16
@ -311,32 +342,27 @@ and UTF-32.
</descr> </descr>
<seealso/> <seealso/>
</element> </element>
<!-- function result Visibility: default -->
<element name="UnicodeLowercase.Result"> <element name="UnicodeLowercase.Result">
<short>Cardinal value for the lowercase equivalent of u.</short> <short>Cardinal value for the lowercase equivalent of u.</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UnicodeLowercase.u"> <element name="UnicodeLowercase.u">
<short>Unicode character vale converted to lowercase in the routine.</short> <short>Unicode character vale converted to lowercase in the routine.</short>
</element> </element>
<!-- function Visibility: default -->
<element name="UTF8LowerCaseViaTables"> <element name="UTF8LowerCaseViaTables">
<short> <short>
Converts a UTF-8-encoded string to lowercase Unicode values using internal Converts a UTF-8-encoded string to lowercase UTF-8 values using internal
case tables. case tables.
</short> </short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<!-- function result Visibility: default -->
<element name="UTF8LowerCaseViaTables.Result"> <element name="UTF8LowerCaseViaTables.Result">
<short>String with the lowercase Unicode values for s.</short> <short>String with the lowercase UTF-8 values for s.</short>
</element> </element>
<!-- argument Visibility: default -->
<element name="UTF8LowerCaseViaTables.s"> <element name="UTF8LowerCaseViaTables.s">
<short> <short>
String with UTF-8 values converted to lowercase Unicode in the routine. String with UTF-8 values converted to lowercase UTF-8 in the routine.
</short> </short>
</element> </element>