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

MinimizeSearchPath

Trims the specified path, and removes empty or duplicate paths.

Declaration

Source position: lazfileutils.pas line 104

function MinimizeSearchPath(

  const SearchPath: string

):string;

Arguments

SearchPath

  

Search path(s) examined in the function.

Function result

Search path after normalization and removal of duplicates.

Description

MinimizeSearchPath is a String function used to trim the path(s) specified in SearchPath, and to remove empty or duplicate paths in the argument. SearchPath can contain multiple path specifications separated by the semicolon (';') character.

MinimizeSearchPath iterates over the path specifications in SearchPath and calls TrimFilename as needed. ChompPathDelim is called as well to remove trailing path delimiters as needed. Duplicate occurrence of a search path are reduced to a single occurrence.

The return value contains the value in SearchPath after normalization and removal of duplicate and empty search path specifications.

See also

ChompPathDelim

  

Removes a trailing path delimiter from the specified value.

TrimFilename

  

Removes leading and trailing spaces, and resolves special characters.

FileNameIsTrimmed

  

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

FindPathInSearchPath

  

Locates the specified path in a delimited list of search paths.


Version 3.2 Generated 2024-02-25 Home