System.SysUtils.ExcludeTrailingPathDelimiter
Delphi
function ExcludeTrailingPathDelimiter(const S: string): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall ExcludeTrailingPathDelimiter(const System::UnicodeString S)/* overload */;
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Renvoie un nom de chemin d'accès sans délimiteur de fin de chaîne.
ExcludeTrailingPathDelimiter renvoie S
en supprimant le délimiteur de chemin d'accès (PathDelim, '\' sous Windows, sinon '/'). Si le dernier caractère de S
n'est pas un délimiteur, la fonction renvoie la chaîne S
non modifiée.
Remarque : ExcludeTrailingPathDelimiter fonctionne avec les ensembles de caractères multi-octets (MBCS).
Plate-forme | Exemple d'entrée (S) | Sortie |
---|---|---|
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 |