Sign in Join
FPDoc Onlineexperiment

ExcludeLeadingPathDelimiter function

In unit sysutils

Strip the leading path delimiter of a path.

Declaration

pascal
function ExcludeLeadingPathDelimiter(const Path: UnicodeString)
: UnicodeString

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

Example: ex95

pascal
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.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.