如题

解决方案 »

  1.   

    有没有删除末尾的\(如果有的话)的函数?
    我生成的路径经常有2个连续的\,幸好win是认得
      

  2.   

    哦,很多:
    ChangeFileExt function
    Changes the extension of a file name.DosPathToUnixPath function
    Converts a DOS-compatible path specification to a Unix-compatible path specification.ExcludeTrailingBackslash function
    Returns a path name without a trailing delimiter.ExcludeTrailingPathDelimiter function
    Returns a path name without a trailing delimiter.ExpandFileName function
    Returns the full path name for a relative file name.ExpandFileNameCase function
    Returns the full path name for a relative file name on a case-sensitive file system.ExpandUNCFileName function
    Returns the full path of a file name in UNC format, if appropriate.ExtractFileDir function
    Extracts the drive and directory parts from FileName.ExtractFileDrive function
    Returns the drive portion of a file name.ExtractFileExt function
    Returns the extension portions of a file name.ExtractFileName function
    Extracts the name and extension parts of a file name.ExtractFilePath function
    Returns the drive and directory portions of a file name.ExtractRelativePath function
    Returns a relative path name, relative to a specific base directory.ExtractShortPathName function
    Converts a file name to the short 8.3 form.IncludeTrailingBackslash function
    Ensures path name ends with delimiterIncludeTrailingPathDelimiter function
    Ensures path name ends with delimiter.IsPathDelimiter function
    Indicates whether the byte at a specified position in a string is the path delimiter.MatchesMask function
    Indicates whether a file name conforms to the format specified by a filter string.MinimizeName function
    hortens a fully qualified path name so that it can be drawn with a specified length limit.ProcessPath procedure
    arses a file name into its constituent parts.UnixPathToDosPath function
    Converts a Unix-compatible path specification to a Dos-compatible path specification.