unit Unit
interface
uses
Windows
Dialogs
type userarray=array of string;
type
TForm
Edit
Button
procedure Button
private
function split(s: string; dot: char): userarray;
{ Private declarations }
public
{ Public declarations }
end;
var
Form
implementation
uses StrUtils;
{$R *
function TForm
var
str:userarray;
i
begin
i:=
j:=
SetLength(str
while Pos(dot
begin
str[j]:=copy(s
i:=pos(dot
s[i
j:=j+
end;
str[j]:=copy(s
result:=str;
end;
procedure TForm
var
ur:userarray;
i:Integer;
begin
ur:=split(Edit
for i :=
begin
if length(ur[i])=
ShowMessage(ur[i]);
end;
end;
end
From:http://tw.wingwit.com/Article/program/Delphi/201311/8530.html