[Overview][Types][Classes][Procedures and functions][Variables][Index] |
Deletes characters (or codepoints) in a UTF-8-encoded string.
Source position: lazutf8.pas line 116
procedure UTF8Delete( |
var s: Utf8String; |
StartCharIndex: PtrInt; |
CharCount: PtrInt |
); |
var s: string; |
StartCharIndex: PtrInt; |
CharCount: PtrInt |
); |
s |
|
String with values to delete in the procedure. |
StartCharIndex |
|
Initial character position where values will be deleted. |
CharCount |
|
Number of characters (or codepoints) to remove in the procedure. |
s |
|
String with values to delete in the procedure. |
StartCharIndex |
|
Initial character position where values will be deleted. |
CharCount |
|
Number of characters (or codepoints) to remove in the procedure. |
UTF8Delete is an overloaded procedure used to delete characters (or codepoints) in a UTF-8-encoded string starting at a given position.
StartCharIndex contains the character position in s where values will be removed. StartCharIndex refers to codepoints and not individual byte or character values. A single character can be expressed as 1-4 byte values in UTF-8 encoding. CharCount indicates the number of codepoints to remove in the function.
The value in s is updated directly in the function.
An overloaded variant of the procedure is provided for platforms where the Win1252 code page is used. On these platforms, raw byte values values in s are converted to the UTF-8 code page prior to performing the delete operation.
Version 3.2 | Generated 2024-02-25 | Home |