System.AnsiStrings.LeftStr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function LeftStr(const AText: AnsiString; const ACount: Integer): AnsiString; overload;

C++

extern DELPHI_PACKAGE System::AnsiString __fastcall LeftStr(const System::AnsiString AText, const int ACount)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.AnsiStrings.pas
System.AnsiStrings.hpp
System.AnsiStrings System.AnsiStrings

Description

Returns the substring of a specified length that appears at the start of a string.

LeftStr returns the leading characters of AText up to a length of ACount characters.

Note: If AText is an AnsiString and the current locale uses multi-byte characters, LeftStr may return more than ACount bytes. To return a specific number of bytes, use LeftBStr.

See Also