System.SysUtils.ExcludeTrailingPathDelimiter

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

function ExcludeTrailingPathDelimiter(const S: string): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall ExcludeTrailingPathDelimiter(const System::UnicodeString S)/* overload */;

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Beschreibung

Gibt einen Pfadnamen ohne das abschließende Begrenzungszeichen zurück.

ExcludeTrailingPathDelimiter gibt S ohne das abschließende Begrenzungszeichen (PathDelim, '\'in Windows, ansonsten '/') zurück. Wenn das letzte Zeichen in S nicht ein Begrenzungszeichen ist, wird S unverändert zurückgegeben.

Hinweis: ExcludeTrailingPathDelimiter arbeitet mit Multibyte-Zeichensätzen (MBCS).

Platform Sample Input (S) Output
Windows C:\Your\Input\Path C:\Your\Input\Path
C:\Your\Input\Path\ C:\Your\Input\Path
Mac OS X
iOS
Android
/Your/Input/Path /Your/Input/Path
/Your/Input/Path/ /Your/Input/Path

Siehe auch