System.SysUtils.ExcludeTrailingPathDelimiter
Delphi
function ExcludeTrailingPathDelimiter(const S: string): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall ExcludeTrailingPathDelimiter(const System::UnicodeString S)/* overload */;
プロパティ
| 種類 | 可視性 | ソース | ユニット | 親 |
|---|---|---|---|---|
| function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
説明
末尾の区切り記号を削除したパス名を返します。
ExcludeTrailingPathDelimiter は、末尾の区切り文字(PathDelim - Windows の場合「\」で、それ以外は 「/」)を削除して、S を返します。 S の最後の文字が区切り文字でなかった場合、S は変更せずにそのまま返されます。
メモ: ExcludeTrailingPathDelimiter は、マルチバイト文字セット(MBCS)で動作します。
| プラットフォーム | 入力例(S) | 出力 |
|---|---|---|
| Windows | C:\Your\Input\Path | C:\Your\Input\Path |
| C:\Your\Input\Path\ | C:\Your\Input\Path | |
| OS X iOS Android Linux |
/Your/Input/Path | /Your/Input/Path |
| /Your/Input/Path/ | /Your/Input/Path |