{-------------------------------------------------------------------------------
过程名: TForm1.RTrimZero
作者: Kevin
日期: 2004.12.22
参数: const AValue: string
返回值: string
功能: 将指定字符串后面的0字符截去
-------------------------------------------------------------------------------}
function TForm1.RTrimZero(const AValue: string): string;
var
nLen : Integer;
i : Integer;
strTemp: string;
begin
if (AValue = '') then Result := '';
nLen := Length(AValue);
strTemp := AValue;
for i:= nLen downto 1 do
begin
if (AValue[i] = '0') then
strTemp[i] := ' '
else
Break;
end;
Result := strTemp;
end;
过程名: TForm1.RTrimZero
作者: Kevin
日期: 2004.12.22
参数: const AValue: string
返回值: string
功能: 将指定字符串后面的0字符截去
-------------------------------------------------------------------------------}
function TForm1.RTrimZero(const AValue: string): string;
var
nLen : Integer;
i : Integer;
strTemp: string;
begin
if (AValue = '') then Result := '';
nLen := Length(AValue);
strTemp := AValue;
for i:= nLen downto 1 do
begin
if (AValue[i] = '0') then
strTemp[i] := ' '
else
Break;
end;
Result := strTemp;
end;
博客展示了一个名为TForm1.RTrimZero的函数,作者为Kevin,日期是2004.12.22。该函数接收一个字符串参数,功能是将指定字符串后面的0字符截去,并返回处理后的字符串,给出了具体的代码实现。
345





