ConcatPaths function
Concatenate an array of paths to form a single path.
Declaration
function ConcatPaths
(const Paths: Array of UnicodeString = UnicodeString)
: UnicodeStringDescription
ConcatPaths will concatenate the different path components in
Paths to a single path. It will insert directory separators
between the various components of the path as needed. No directory
separators will be added to the beginning or the end of the path, and none
will be taken away.See also
- IncludeTrailingPathDelimiter
- IncludeLeadingPathDelimiter
- ExcludeTrailingPathDelimiter
- IncludeTrailingPathDelimiter
Example: ex96
program ex96;
{ This program demonstrates the Concatpaths function }
uses sysutils;
begin
// will write /this/path/more/levels/
Writeln(ConcatPaths(['/this/','path','more/levels/']));
// will write this/path/more/levels/
Writeln(ConcatPaths(['this/','path','more/levels/']));
// will write this/path/more/levels
Writeln(ConcatPaths(['this/','path','more/levels']));
end.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
