编写函数 怎样取一个字符串的前几位和后几位。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 前n位:copy(s,1,n);后n位:copy(s,length(s)-n+1,n) Varstr:string;constr:string;beginstr:='meng_xuan';constr=copy(str,1,3); //=menshowmessage(constr); 取后几位:function RightStr(const AText: string; ACount: Integer): string;取前几位:function LeftStr(const AText: string; ACount: Integer): string;任意取: function Copy(S; Index, Count: Integer): string; var str,s1,s2:string;begin str:='agdaedd'; s1:=LeftStr(str,2); //get 2 ,the result is 'ad'; s2:=RightStr(str,3); //get 3 from back ,the result is 'edd'; end; 随便取: function Copy(S; Index, Count: Integer): string;后几位:function RightStr(const AText: string; ACount: Integer): string;前几位:function LeftStr(const AText: string; ACount: Integer): string; 来晚了,都说完了算了,来都来了(转载)^._____________.^随便取: function Copy(S; Index, Count: Integer): string;后几位:function RightStr(const AText: string; ACount: Integer): string;前几位:function LeftStr(const AText: string; ACount: Integer): string; MidStr,LeftStr,RightStr时别忘了Uses StrUtils; DELPHI传地址问题~! 怎么在 DBGrid 中跟踪数据记录 用TIdTcpClient 控件如何主动接受服务端传来的数据呀? 急!!! 哪里有DELPHI6的安装盘下载,大家帮忙推荐一下,多谢 ado下事务[SQL SERVER]为何会启动失败? 请教关于ADO连接的加密及访问权限的两个问题 公司(上海)倒闭了,我准备回新疆卖羊肉串。你们说这能用delphi和java实现吗? 打印问题紧急求援!!!!!怎样多给分我准备给100分!!!!! 关于F1BOOK的问题,请各位前辈进入 我想找兼职。谁能帮我。 这个功能sql语句能实现吗?? 如何在delphi程序中使用西班牙语?
后n位:copy(s,length(s)-n+1,n)
str:string;
constr:string;
begin
str:='meng_xuan';
constr=copy(str,1,3); //=men
showmessage(constr);
取前几位:function LeftStr(const AText: string; ACount: Integer): string;
任意取: function Copy(S; Index, Count: Integer): string;
str,s1,s2:string;
begin
str:='agdaedd';
s1:=LeftStr(str,2); //get 2 ,the result is 'ad';
s2:=RightStr(str,3); //get 3 from back ,the result is 'edd';
end;
后几位:function RightStr(const AText: string; ACount: Integer): string;
前几位:function LeftStr(const AText: string; ACount: Integer): string;
后几位:function RightStr(const AText: string; ACount: Integer): string;
前几位:function LeftStr(const AText: string; ACount: Integer): string;