当前位置:主页>Delphi教程>文章内容
将指定字符串后面的'0'字符截去[原创
来源: 作者: 发布时间:2007-04-29  
{-------------------------------------------------------------------------------
  过程名:    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;


 
上一篇:delphi来写你的第一个dll文件,非常简单   下一篇:CRC算法的实现
 
  相关文章
·delphi来写你的第一个dll文件,非常简
·CRC算法的实现
·Delphi中使用OLE方法操作Excel
·Delphi中避免使用ClassName判断对象的
·200开发技术年度综述之Windows开发
·发掘ListBox的潜力(一):自动调整横
·类似Access查找中的记忆功能
·如何使程序在运行时自动注册ActiveX控
·模拟Nokia手机输入的编辑框
·Delphi中OnDrawCell的使用技巧
·Delphi和Office程序开发
·用Delphi制作DLL小结
 
【关闭窗口】
推荐本站资源
最新文章