delphi函数问题?

我用delphi编写小程序的时候,用到了一个leftstr()函数,编译的时候却总是说我没有声明,这个函数要声明吗?不懂!我看delphi的帮助文件了,我的用法和他差不多呀!
我的用法:
leftstr(a);//a是字符串变量;

米琪卡哇伊
浏览 968回答 2
2回答

Helenr

Returns the substring of a specified length that appears at the start of a string.UnitStrUtilsCategorystring handling routinesDelphi 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);DescriptionLeftStr 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那里使用一下
打开App,查看更多内容
随时随地看视频慕课网APP