function SbctoDbc(s: string): string;
var
nlength, i: integer;
str, ctmp, c1, c2: string;
begin
nlength := length(s);
if (nlength = 0) then
exit;
str := '';
setlength(ctmp, nlength + 1);
ctmp := s;
i := 1;
while (i <= nlength) do
begin
c1 := ctmp[i];
c2 := ctmp[i + 1];
if (c1 = #163) then
begin
str := str + chr(ord(c2[1]) - 128);
inc(i, 2);
continue;
end;
if (c1 > #163) then
begin
str := str + c1;
str := str + c2;
inc(i, 2);
continue;
end;
if (c1 = #161) and (c2 = #161) then
begin
str := str + ' ';
inc(i, 2);
continue;
end;
str := str + c1;
inc(i);
end;
result := str;
end;
相关文章
- 03-26全角转半角
- 03-26线性代数-矩阵-转置 C和C++的实现
- 03-26(转) IDirectSoundBuffer::SetVolume的参数与音量分贝的函数关系
- 03-26【转】CDH5.16.1启用Kerberos
- 03-26System State 转储分析案例一则
- 03-26System State 转储分析案例一则
- 03-26c++中派生类对基类成员的三种访问规则(转)
- 03-26批量txt之ANSI编码转UTF-8编码
- 03-26TensorFlow 辨异 —— tf.add(a, b) 与 a+b(tf.assign 与 =)、tf.nn.bias_add 与 tf.add(转)
- 03-26转:VCS仿真vivado IP的方法