RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.ExcludeTrailingPathDelimiter Function

Returns a path name without a trailing delimiter.

Pascal
function ExcludeTrailingPathDelimiter(const S: string): string;
C++
AnsiString ExcludeTrailingPathDelimiter(const AnsiString S);

SysUtils

ExcludeTrailingPathDelimiter returns S with any trailing path delimiter ('\' on Windows, '/' on Linux) removed. If the last character in S is a delimiter, the return value is S with the last character removed. Otherwise, S is returned unchanged.

Note: ExcludeTrailingPathDelimiter works with multibyte character sets.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!