System.AnsiStrings.IncludeTrailingPathDelimiter
Delphi
function IncludeTrailingPathDelimiter(const S: AnsiString): AnsiString;
C++
extern DELPHI_PACKAGE System::AnsiString __fastcall IncludeTrailingPathDelimiter(const System::AnsiString S)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.AnsiStrings.pas System.AnsiStrings.hpp |
System.AnsiStrings | System.AnsiStrings |
Description
Ensures that the path name ends with a delimiter.
Note: Do not use this method for new development. In particular, if you are doing multi-device development, we recommend that you use the next-generation implementation, System.SysUtils.IncludeTrailingPathDelimiter, which provides support for mobile platforms as well.
IncludeTrailingPathDelimiter ensures that a path name ends with a trailing path delimiter (PathDelim, '\' on Windows, '/' otherwise). If S
already ends with a trailing delimiter character, it is returned unchanged; otherwise, S
with an appended delimiter character is returned.
Note: IncludeTrailingPathDelimiter works with multibyte character sets (MBCS).
Platform | Sample Input (S) | Output |
---|---|---|
Windows | C:\Your\Input\Path | C:\Your\Input\Path\ |
C:\Your\Input\Path\ | C:\Your\Input\Path\ | |
OS X | /Your/Input/Path | /Your/Input/Path/ |
/Your/Input/Path/ | /Your/Input/Path/ | |
iOS Android |
This method does not support mobile platforms. |