[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: Mar 17 2017