[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

IncludeLeadingPathDelimiter

Prepend a path delimiter if there is not already one.

Declaration

Source position: finah.inc line 37

function IncludeLeadingPathDelimiter(

  const Path: UNICODESTRING

):UNICODESTRING;

function IncludeLeadingPathDelimiter(

  const Path: RAWBYTESTRING

):RAWBYTESTRING;

Description

IncludeLeadingPathDelimiter will insert a path delimiter (#rtl.system.DirectorySeparator) in the first position of Path, if there is not already a directory separator at that position. It will return the resulting string. If the path is empty, a DirectorySeparator character is returned.

See also

IncludeTrailingPathDelimiter

  

Add trailing directory separator to a pathname, if needed.

ExcludeLeadingPathDelimiter

  

Strip the leading path delimiter of a path

ExcludeTrailingPathDelimiter

  

Strip trailing directory separator from a pathname, if needed.

ConcatPaths

  

Concatenate an array of paths to form a single path

Example

Program Example94;

{ This program demonstrates the IncludeLeadingPathDelimiter function }

Uses sysutils;

Begin
End.

Documentation generated on: Jun 22 2020