假如 old_string:='P10005';
怎样实现 new_string:='P10006';
谢谢!
怎样实现 new_string:='P10006';
谢谢!
解决方案 »
- delphi中ADO方式连接数据库怎样进行异常捕获???
- 谁用过这个RzTimePicker控间
- 请问谁有delphi3,或告之下载地址,急用,谢谢!
- 在程序里如何通过麦克风录音,并保存为mp3文件?
- 求改变桌面外观属性的API函数
- Delphi自带的Indy例子中的TelnetClient例子中的问题??
- ACCESS为什么会这样?
- 高手赐教
- 微软试题:
- 急!-ado中与excel连接的问题?
- 请问listview的排序问题!!!!!!!!!!????????????????????????????
- 请问listview的排序问题!!!!!!!!!!????????????????????????????
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
a:string;
b:string;
c:string;
i:integer;
begin
a:= 'P10005';
showmessage(a);
b:=copy(a,1,5);
c:=copy(a,6,1);
i:=strtoint(c)+1;
showmessage(b+inttostr(i));
end;end.
newstring:='p'+inttostr(strtoint(RigtStr(oldstring,5))+1)
s1:=midstr(old_str,2,5);
s1:=inttostr(strtoint(old_str)+1);showmessage('p'+s1);