procedure GetHjjeStr(var str: string
hjje: Currency);
const
C_Digit = '零壹贰叁肆伍陆柒捌玖';
var
tempstr, one: string;
iCount, ix, iy, ip: integer;
begin
tempstr := format('%.0f', [hjje * 100]);
gcHjje[1] := C_Space;
for iCount := 4 to 20 do
begin
if (iCount mod 2) = 0 then
gcHjje[iCount] := ' ';
end;
if (StrToInt(tempstr) > 0) then begin //金额为零
gcHjje[1] := format('%.2f', [hjje]);
gcHjje[1] := format('%s%s',
[gcHjje[1],
copy(C_Space, 1, 10 - Length(gcHjje[1])), gcHjje[1]]);
tempstr := format('%9.0f', [hjje * 100]);
ix := 10;
for iCount := 4 to 20 do
begin
if ((iCount mod 2) = 0) then
begin
ix := ix - 1;
if (tempstr[ix] = ' ') then
begin
gcHjje[iCount] := '¥';
for iy := iCount + 1 to 20 do
if ((iy mod 2) = 0) then
gcHjje[iy] := ' ';
break;
end;
one := Copy(C_Digit,(Ord(tempstr[ix])-Ord('0'))*2+1,2);
gcHjje[iCount] := one;
end;
end;
end;
end;
//以上是小写的,有带¥的。
如果是想细线的哪种就只要修改一下就可达到了。