[Overview][Constants][Types][Procedures and functions] Reference for unit 'strutils' (#rtl)

LeftStr

Copies Count characters starting at the left of a string.

Declaration

Source position: line 0

function LeftStr(

  const AText: AnsiString;

  const ACount: Integer

):AnsiString;

function LeftStr(

  const AText: WideString;

  const ACount: Integer

):WideString;

Arguments

AText

  

String to copy characters from.

ACount

  

Number of characters to copy.

Function result

First N characters of the string.

Arguments

AText

  

String to copy characters from.

ACount

  

Number of characters to copy.

Function result

First N characters of the string.

Description

LeftStrreturns a string containing the leftmost ACountcharacters from the string AText. If ACountis larger than the length (in characters) of AText, only as many characters as available are returned.

Errors

None.

See also

LeftBStr

  

Copies Count characters starting at the left of a string.

AnsiLeftStr

  

Copies a number of characters starting at the left of a string

RightStr

  

Copy a given number of characters, counting from the right of a string.

MidStr

  

Copies a number of characters starting at a given position in a string.