Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

IncludeLeadingPathDelimiter

Prepend a path delimiter if there is not already one.

Declaration

Source position: finah.inc line 40

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: Nov 22 2024