Language:
Русский
English
{StrRScan.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the StrRScan function.}
{ Return pointer to name part of a full path name }
function NamePart(FileName: PChar): PChar;
var
P: PChar;
begin
P := StrRScan(FileName, '\');
if P = nil then
begin
P := StrRScan(FileName, ':');
if P = nil then P := FileName;
end;
NamePart := P;
end;