function filter(src: string): string; var i:integer; begin i:=1; while (src<>'') and (i<=length(src)) do if not (src[i] in ['a'..'z','A'..'Z']) then delete(src, i, 1) else inc(i); result:=src; end;
function TForm1.ExpString(Src: String): String; Var i:integer; begin For i:=0 to Length(Src) do if Src[i] in ['a'..'z','A'..'Z'] then Result:=Result+Src[i]; end;
function A(Str: string): string; var I, J: Integer; begin I := 0; J := 0; SetLength(Result, Length(Str)); while I <= Length(Str) do begin if IsDBCSLeadByte(Byte(Str[I])) then begin Inc(I, 2); Continue; end; if (Str[I] in ['a'..'z','A'..'Z']) then begin Inc(J); Result[J] := Str[I]; end; Inc(I); end; SetLength(Result, J); end;
var
i:integer;
begin
i:=1;
while (src<>'') and (i<=length(src)) do
if not (src[i] in ['a'..'z','A'..'Z'])
then delete(src, i, 1)
else inc(i);
result:=src;
end;
Var
i:integer;
begin
For i:=0 to Length(Src) do
if Src[i] in ['a'..'z','A'..'Z'] then Result:=Result+Src[i];
end;
var
I, J: Integer;
begin
I := 0;
J := 0;
SetLength(Result, Length(Str));
while I <= Length(Str) do
begin
if IsDBCSLeadByte(Byte(Str[I])) then
begin
Inc(I, 2);
Continue;
end;
if (Str[I] in ['a'..'z','A'..'Z']) then
begin
Inc(J);
Result[J] := Str[I];
end;
Inc(I);
end;
SetLength(Result, J);
end;
inc()函数有什么功能?