System.StrUtils.LeftStr
Delphi
function LeftStr(const AText: AnsiString; const ACount: Integer): AnsiString; overload;
function LeftStr(const AText: string; const ACount: Integer): string; overload;
C++
extern DELPHI_PACKAGE System::AnsiString __fastcall LeftStr _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (const System::AnsiString AText, const int ACount)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.StrUtils.pas System.StrUtils.hpp |
System.StrUtils | System.StrUtils |
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.