得到拼音码的函数
来源:互联网 发布:见缝插针游戏源码 编辑:程序博客网 时间:2024/04/25 14:51
unit upubil;
interface
function getpyindexchar(const hzchar:string):string;
function getpym(const hzchar:string):string;
implementation
function getpym(const hzchar:string):string;
var
icount : integer;
spym : string;
begin
icount:=1;
while icount<=length(hzchar) do
begin
if getpyindexchar(copy(hzchar,icount,2))='' then
begin
spym:=spym+copy(hzchar,icount,1);
icount:=icount+1;
end
else
begin
spym:=spym+getpyindexchar(copy(hzchar,icount,2));
icount:=icount+2;
end;
end;
result := spym;
end;
function getpyindexchar(const hzchar:string):string;
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..$d1b8 : result := 'x';
$d1b9..$d4d0 : result := 'y';
$d4d1..$d7f9 : result := 'z';
else
result :=''; //hzchar;//char(0);
end;
end;
end.
interface
function getpyindexchar(const hzchar:string):string;
function getpym(const hzchar:string):string;
implementation
function getpym(const hzchar:string):string;
var
icount : integer;
spym : string;
begin
icount:=1;
while icount<=length(hzchar) do
begin
if getpyindexchar(copy(hzchar,icount,2))='' then
begin
spym:=spym+copy(hzchar,icount,1);
icount:=icount+1;
end
else
begin
spym:=spym+getpyindexchar(copy(hzchar,icount,2));
icount:=icount+2;
end;
end;
result := spym;
end;
function getpyindexchar(const hzchar:string):string;
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..$d1b8 : result := 'x';
$d1b9..$d4d0 : result := 'y';
$d4d1..$d7f9 : result := 'z';
else
result :=''; //hzchar;//char(0);
end;
end;
end.
- 得到拼音码的函数
- 得到汉字的拼音码
- 得到汉字拼音的原码
- 得到汉字的拼音
- 从获到拼音函数得到的一点心得体会
- 得到汉字的拼音首字母
- 得到汉字拼音码-首字母
- Excel汉字转换得到其拼音函数
- 在C#中怎么得到汉字的拼音码
- 根据汉字得到相应的拼音
- 自动得到汉字拼音首字母的代码
- 如何调用输入法,得到汉字的拼音
- 如何得到汉字的拼音首字母呢?
- oracle 获取拼音码的函数
- 根据字符串得到拼音首码
- 获取拼音的函数
- sql拼音码函数
- 得到扩展名,得到验证码的函数,创建表格
- 30G信箱邀请~数量不多!
- C#常用函数
- C++/CLI中的默认属性访问
- 如何读取保存在数据库中的图片显示在DataGrid中
- 西雅图MVP峰会见闻
- 得到拼音码的函数
- 托管C++中函数调用的双重转换(Double Thunking)
- 重张Blog
- 正确分区之秘密公式!!!(不看白不看)
- Response.Flush的使用心得
- IBM Java 5 SE Beta SDKs Available Now!
- 教大家一招金蝉脱窍——一招克死所有病毒!
- 关于web2.0
- 小工具:MASM32Maker 1.10