2 回答

TA貢獻1780條經(jīng)驗 獲得超4個贊
Returns the substring of a specified length that appears at the start of a string.
Unit
StrUtils
Category
string handling routines
Delphi syntax:
function LeftStr(const AText: AnsiString; const ACount: Integer): AnsiString; overload;
function LeftStr(const AText: WideString; const ACount: Integer): WideString; overload;
C++ syntax:
extern PACKAGE AnsiString __fastcall LeftStr(const AnsiString AText, int ACount);
extern PACKAGE WideString __fastcall LeftStr(const WideString AText, int ACount);
Description
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.
要使用單元文件StrUtils,你在uses那里使用一下
- 2 回答
- 0 關(guān)注
- 1206 瀏覽
添加回答
舉報