2 回答
TA贡献1780条经验 获得超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 关注
- 1054 浏览
添加回答
举报