acceptstr=192.168.18.24,dfa
sendid:=Leftstr(acceptstr,AnsiPos(',',acceptstr)-1);
sendid可以获取192.168.18.24
那如何通过rightstr函数dfa
sendid:=Leftstr(acceptstr,AnsiPos(',',acceptstr)-1);
sendid可以获取192.168.18.24
那如何通过rightstr函数dfa
调试欢乐多
procedure TForm1.Button1Click(Sender: TObject);
var
acceptstr,sendid,str:string;
begin
acceptstr:='192.168.18.24,dfa';
sendid:=Leftstr(acceptstr,AnsiPos(',',acceptstr)-1);
str:=rightstr(acceptstr,length(acceptstr)-AnsiPos(',',acceptstr)-1);
showmessage(str);
end;