这里有Copy过来的几个函数,重码太多,没办法对付了
function GetPYIndexChar( hzchar:string):char;
begin
case WORD(hzchar[1]) shl 8 + WORD(hzchar[2]) of
$B0A1..$B0C4 : result := 'A';
$B0C5..$B2C0 : result := 'B';
$B2C1..$B4ED : result := 'C';
$B4EE..$B6E9 : result := 'D';
$B6EA..$B7A1 : result := 'E';
$B7A2..$B8C0 : result := 'F';
$B8C1..$B9FD : result := 'G';
$B9FE..$BBF6 : result := 'H';
$BBF7..$BFA5 : result := 'J';
$BFA6..$C0AB : result := 'K';
$C0AC..$C2E7 : result := 'L';
$C2E8..$C4C2 : result := 'M';
$C4C3..$C5B5 : result := 'N';
$C5B6..$C5BD : result := 'O';
$C5BE..$C6D9 : result := 'P';
$C6DA..$C8BA : result := 'Q';
$C8BB..$C8F5 : result := 'R';
$C8F6..$CBF9 : result := 'S';
$CBFA..$CDD9 : result := 'T';
$CDDA..$CEF3 : result := 'W';
$CEF4..$D188 : result := 'X';
$D1B9..$D4D0 : result := 'Y';
$D4D1..$D7F9 : result := 'Z';
else
result := char(0);
end;
end;function getPyString(ChString:String);
var i, j:integer; Py,hzchar :string;
begin
Py:='';
i:=1;
while i<=Length(ChString) do
begin
hzchar:=ChString[i]+ChString[i+1];
Py:=Py+GetPYIndexChar(hzchar);
i:=i+2;
end;
result:=Py;
end;
function GetPYIndexChar( hzchar:string):char;
begin
case WORD(hzchar[1]) shl 8 + WORD(hzchar[2]) of
$B0A1..$B0C4 : result := 'A';
$B0C5..$B2C0 : result := 'B';
$B2C1..$B4ED : result := 'C';
$B4EE..$B6E9 : result := 'D';
$B6EA..$B7A1 : result := 'E';
$B7A2..$B8C0 : result := 'F';
$B8C1..$B9FD : result := 'G';
$B9FE..$BBF6 : result := 'H';
$BBF7..$BFA5 : result := 'J';
$BFA6..$C0AB : result := 'K';
$C0AC..$C2E7 : result := 'L';
$C2E8..$C4C2 : result := 'M';
$C4C3..$C5B5 : result := 'N';
$C5B6..$C5BD : result := 'O';
$C5BE..$C6D9 : result := 'P';
$C6DA..$C8BA : result := 'Q';
$C8BB..$C8F5 : result := 'R';
$C8F6..$CBF9 : result := 'S';
$CBFA..$CDD9 : result := 'T';
$CDDA..$CEF3 : result := 'W';
$CEF4..$D188 : result := 'X';
$D1B9..$D4D0 : result := 'Y';
$D4D1..$D7F9 : result := 'Z';
else
result := char(0);
end;
end;function getPyString(ChString:String);
var i, j:integer; Py,hzchar :string;
begin
Py:='';
i:=1;
while i<=Length(ChString) do
begin
hzchar:=ChString[i]+ChString[i+1];
Py:=Py+GetPYIndexChar(hzchar);
i:=i+2;
end;
result:=Py;
end;
解决方案 »
- 做像书类似的软件,用delphi的olecontainer来显示合适吗?
- 12rain(中雨~百年孤独)来接分~
- delphi怎样枚举一个窗体所有的类名和句柄?
- 非技术问题,看看便知,解决后立刻给分!
- 和我深爱的女孩分手了!!up有分,决不食言!!!!
- ado数据库引擎问题,急,
- 收藏夹的拖放是怎么实现的
- ★★★快来抢100分!!!★★★:用mediaplayer组件播放*.mp3,*.mpg格式的文件为何速度特慢,质量特差,有没有好的解决方案?
- 我有三天登不上CSDN,今天好不容易上来了,发现专家分与参与分全没了,可用分多了
- 我今天很不爽!唉`~`~`~`
- 请问各位~现在学什么、学到什么程度或者干什么、在哪里干能年薪十万或者更多~多谢参加讨论~~:)
- 我正在用mmtools编写mp3播放器,但不知道怎样编写播放列表??
[email protected]