多谢!

解决方案 »

  1.   

    function ExtractFileExt(const FileName: string): string;{ ExpandFileName expands the given filename to a fully qualified filename.
      The resulting string consists of a drive letter, a colon, a root relative
      directory path, and a filename. Embedded '.' and '..' directory references
      are removed. }
      

  2.   

    VAR
      s:string;
    begin
      s:=ExtractFileExt('a.txt');//s='.txt'
      memo1.Lines.Add(s); 
      Delete(s,1,1);       //='txt'
      Memo1.Lines.Add(s);
    end;
      

  3.   

    ShowMessage(ExtractFileExt('sdfdf.ini'));