Function get_str(ss:string):string;
var s:string;
i:integer;
begin
s:='';
for i:=1 to length(ss) do
if not (ss in ['0'..'9']) then
s:=s+ss;
result:=s;
End;
type
Tkeyword=set of char;
var
keyword : Tkeyword;
i:integer;
A:string;
begin
A:='abc78y9e4';
A:=Edit1.Text;
keyword:=['0','1','2','3','4','5','6','7','8','9'];
for i:=1 to Length(A) do
if A in Keyword then A:=char(0);
Edit1.Text:=A;
end;
那一样的呀
type
Tkeyword=set of char;
var
keyword : Tkeyword;
i:integer;
A:string;
begin
A:='abc78y9e4';
A:=Edit1.Text;
keyword:=['0','1','2','3','4','5','6','7','8','9'];
for i:=1 to Length(A) do
if A in Keyword then //这个地方就是在判断有没有0-9这10 个数字
A:=char(0);
Edit1.Text:=A;
end;
Function strOK(ss:string):boolean;
var
i:integer;
begin
result=true;
for i:=1 to length(ss) do
if (ss in ['0'..'9']) then
begin
result=false;
exit;
end;
End;