[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'LazFileUtils' (#lazutils)

TrimFilename

Removes leading and trailing spaces, and resolves special characters.

Declaration

Source position: lazfileutils.pas line 60

function TrimFilename(

  const AFilename: string

):string;

Arguments

AFilename

  

Path and file name for the operation.

Function result

New value for the path and file name.

Description

TrimFilename is a String function used to remove leading and trailing spaces (Decimal 32) in the specified path and file name. In addition, ResolveDots is called to expand directory characters (like '.' and '..') and to remove duplicate path delimiters (like '//').

See also

ResolveDots

  

Resolves relative path references and removes duplicate path delimiters.

FileNameIsTrimmed

  

True if the specified file name contains characters to remove or resolve before use.

CleanAndExpandFilename

  

Removes whitespace and resolves special characters in the specified file name.

CleanAndExpandDirectory

  

Removes whitespace and resolves special characters in the specified path.

TrimAndExpandFilename

  

Cleans and resolves a file path to the specified base directory name.

TrimAndExpandDirectory

  

Cleans and resolves a relative path to a base directory.


Version 4.0 Generated 2025-05-03 Home