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

ExcludeLeadingPathDelimiter

Strip the leading path delimiter of a path

Declaration

Source position: finah.inc line 38

function ExcludeLeadingPathDelimiter(

  const Path: UNICODESTRING

):UNICODESTRING;

function ExcludeLeadingPathDelimiter(

  const Path: RAWBYTESTRING

):RAWBYTESTRING;

Description

ExcludeLeadingPathDelimiter will remove any path delimiter on the first position of Path if there is one. if there is none (or the path is empty), it is left untouched.

See also

IncludeTrailingPathDelimiter

  

Add trailing directory separator to a pathname, if needed.

IncludeLeadingPathDelimiter

  

Prepend a path delimiter if there is not already one.

ExcludeTrailingPathDelimiter

  

Strip trailing directory separator from a pathname, if needed.

ConcatPaths

  

Concatenate an array of paths to form a single path

Example

Program Example95;

{ This program demonstrates the IncludeLeadingPathDelimiter function }

Uses sysutils;

Begin
  // Will print "/this/path"
  Writeln(IncludeLeadingPathDelimiter('this/path'));
  // The same result 
  Writeln(IncludeLeadingPathDelimiter('/this/path'));
End.

Documentation generated on: May 14 2021