Sign in Join
FPDoc Onlineexperiment

LeftStr function

In unit StrUtils

Copies Count characters starting at the left of a string.

Declaration

pascal
function LeftStr(const AText: AnsiString; const ACount: SizeInt)
: AnsiString

Arguments

AText

String to copy characters from.

ACount

Number of characters to copy.

Function result

First N characters of the string.

Description

LeftStr returns a string containing the leftmost ACount characters from the string AText . If ACount is larger than the length (in characters) of AText , only as many characters as available are returned.

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.