亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

delphi函數問題?

delphi函數問題?

米琪卡哇伊 2019-03-06 11:07:06
我用delphi編寫小程序的時候,用到了一個leftstr()函數,編譯的時候卻總是說我沒有聲明,這個函數要聲明嗎?不懂!我看delphi的幫助文件了,我的用法和他差不多呀!我的用法:leftstr(a);//a是字符串變量;
查看完整描述

2 回答

?
Helenr

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那里使用一下

查看完整回答
反對 回復 2019-03-27
  • 2 回答
  • 0 關注
  • 1207 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號