16,742
社区成员
发帖
与我相关
我的任务
分享{用TstringList吧}
const IP='192.168.001.120';
var
slist:Tstringlist;
begin
slist:=Tstringlist.Create;
try
slist.Delimiter='.';
slist.DelimitedText:=IP;
showmessage(slist.Strings[0]); {192}
showmessage(slist.Strings[1]); {168}
showmessage(slist.Strings[2]); {001}
showmessage(slist.Strings[3]); {120}
finally
slist.Free;
end;
end;