Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.06.20;
Скачать: CL | DM;

Вниз

как получить из полного пути, имя вайла и его расширение   Найти похожие ветки 

 
lena19   (2004-06-06 21:28) [0]

всем привет
как получить из полного пути, имя вайла и его расширение


 
AndersoNRules   (2004-06-06 21:29) [1]

ExtractFileName


 
lena19   (2004-06-06 21:31) [2]

ок спасибо


 
AlexG ©   (2004-06-06 21:31) [3]

Дополни > ExtractFileName F1, по вкусу, и добавь See also


 
grom   (2004-06-06 21:37) [4]

("c:\sys\command.com" -> "command.com")
-------------------------------
function MyExtractFileName(const Path: string): string;
var
 i: integer;
begin
 Result := "";
 i := Length(Path);
 while ((Path[i] <> "\") and (Path[i] <> "/")) and (i > 0) do
   dec(i);
 if i = 0 then Result := Path else
     if i = Length(Path) then Result  := "" else
       Result := Copy(Path, i+1, Length(Path) - i);
end;


 
Gero ©   (2004-06-06 22:03) [5]


> grom   (06.06.04 21:37)

А я лучше могу написать:

function MyExtractFileName(const Path: string): string;
begin
Result := ExtractFileName(Path);
end;


 
GuAV ©   (2004-06-06 22:27) [6]


> function MyExtractFileName(const Path: string): string;
> begin
> Result := ExtractFileName(Path);
> end;

function GeroExtractFileName(const Path: string): string;
begin
Result := ExtractFileName(Path);
end;

function GuAVExtractFileName(const Path: string): string;
begin
Result := GeroExtractFileName(Path);
end;


 
Gero ©   (2004-06-06 23:03) [7]


> GuAV ©   (06.06.04 22:27)

Во-во, кстати, в исходниках VCL я встречался с подобными примерами :)



Страницы: 1 вся ветка

Текущий архив: 2004.06.20;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.028 c
14-1086124772
FRick
2004-06-02 01:19
2004.06.20
Яркость монитора


9-1077301746
Creep
2004-02-20 21:29
2004.06.20
Скажите ктонибудь пожалуйста где скачать Delphix


14-1086035049
Piter
2004-06-01 00:24
2004.06.20
http://www.source.ru/


1-1086703741
BlackLord2003
2004-06-08 18:09
2004.06.20
ClipText


9-1077522979
Pinochet
2004-02-23 10:56
2004.06.20
Быстродействие игры