[Overview][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'LazUTF8' (#lazutils)

UTF8PadLeft

Adds the specified number of values in AUtf8Char to the beginning of a string.

Declaration

Source position: lazutf8.pas line 137

function UTF8PadLeft(

  const S: string;

  const N: Integer;

  const AUtf8Char: string = #32

):string;

Arguments

S

  

Original string value to modify in the function.

N

  

Number of codepoints desired in the modified string.

AUtf8Char

  

UTF-8 codepoint to insert into the string.

Function result

Updated value for the string with characters inserted at the beginning.

Description

UTF8PadLeft is used to add the specified number of values in AUtf8Char to the beginning of a string. The default value for AUtf8Char is #32 ([SPACE]), but can contain any valid UTF-8 codepoint (1 to 4 bytes). UTF8PadLeft calls Utf8AddChar to create the return value for the function.


Version 3.2 Generated 2024-02-25 Home