本文整理自网络,侵删。
delphi分离汉字和英文字母
const
s:widestring='k你asdfdsf好d吗?';
var
i:integer;
y,h:string;
begin
while Length(s)<>0 do
begin
if Length(s[i])=Length(string(s[i])) then
y:=y+s[i]
else h:=h+s[i];
s:=copy(s,2,length(s));
end;
edit1.Text:=y;
edit2.Text:=h;
end;
相关阅读 >>
Delphi windows 编程[2] - 学习窗体生成的过程二
Delphi tdirectory.tfilterpredicate
Delphi firedac 下的 sqlite [6] - 加密
更多相关阅读请进入《Delphi》频道 >>