ExcludeTrailingBackslash function
String / Filename routines |
![]() ![]() ![]() |
acUtils
|
function ExcludeTrailingBackslash(St: String): String;
|
The ExcludeTrailingBackslash function removes a backslashes '\' from the end of string (i.e: file path). For example result of ExcludeTrailingBackslash('c:\windows\') will be "c:\windows".
|
This function used in the AppControls for Delphi 2/3/4 and BCB 1/3/4 only. In the Delphi 5 and later please use same routine from standard SysUtils unit.
|
function ExcludeTrailingBackslash(const St: String): String;
|
begin
|
Result := St;
|
while (Result <> '') and (Result[Length(Result)] = '\') do
|
SetLength(Result, Length(Result) - 1);
|
end;
|