rightstr 和leftstr返回字符都是widestring 和ansistring
我用
var
actionid :string;
newstring:string;
然后actionid 是从数据库取得的字符串,
newstring:= rightstr(string,6,strlen(string)-5);都有报错。类型不对
请问能怎么转换呢,
谢谢 !
我用
var
actionid :string;
newstring:string;
然后actionid 是从数据库取得的字符串,
newstring:= rightstr(string,6,strlen(string)-5);都有报错。类型不对
请问能怎么转换呢,
谢谢 !
解决方案 »
- 给excel指定区域画线,如果excel不只一页,每页底下就没有边框?
- 如何获取网络连接状态、时间、速度????
- 谁有TChart控件的用法,或是详细说明啊? (最好是中文说明的)
- 错误提示:“当前提供程序不支持从单一执行返回多个记录”。请高手指点!谢谢:)
- odbc问题
- 初学,如何分别取出数据库当前时间的年,月,日,时,分,秒。
- 把查询功能单独出来时,出错。帮我看看!
- identifier expected but 'BEGIN' found 是怎么回事啊
- 用什么方法可以实现用户可以在报表定制内容,然后固定打印??????????
- 各位高手,快救救小妹,哪里有Delphi Barcode 控件下载?
- shelllistview右键菜单
- 我在用treeview中遇到了难题了,大家帮帮我啊,treeview节点data的使用
function RightStr(const AText: WideString; const ACount: Integer): WideString; overload;C++ syntax:extern PACKAGE AnsiString __fastcall RightStr(const AnsiString AText, int ACount);
extern PACKAGE WideString __fastcall RightStr(const WideString AText, int ACount);DescriptionRightStr returns the trailing characters of AText up to a length of ACount characters. Thus, for example, if AText is the string "Programmer" and ACount is 7, RightStr returns the string "grammer".Note: If AText is an AnsiString and the current locale uses multi-byte characters, RightStr may return more than ACount bytes. To return a specific number of bytes, use RightBStr.
--------------------------------只有2个参数吧
newstring:= rightstr(string,6,strlen(string)-5);
用了3个参数
试试
newstring:= rightstr(string,strlen(string)-5);
除掉前五个字符后形成的字符串
都是string就可以啊!
procedure TForm1.Button1Click(Sender: TObject);
var
actionid :string;
newstring:string;
begin
actionid:= 'aaaaaawwwwww';
newstring:= rightstr(actionid,length(actionid)-5);
Edit1.Text:= newstring;
end;