374919318 发表于 2014-6-27 08:25:24

delphi分离汉字和英文字母

const
s:widestring='k你asdfdsf好d吗?';
var
i:integer;
y,h:string;
begin
while Length(s)<>0 do
begin
if Length(s)=Length(string(s)) then
y:=y+s
else h:=h+s;
s:=copy(s,2,length(s));
end;
edit1.Text:=y;
edit2.Text:=h;
end;
页: [1]
查看完整版本: delphi分离汉字和英文字母