Форум: "Основная";
Текущий архив: 2002.01.28;
Скачать: [xml.tar.bz2];
ВнизКак найти далее при помощи pos? Найти похожие ветки
← →
panov (2002-01-08 15:04) [10]Из блестящей идеи Андрей Сенченко © (08.01.02 10:23)
и Юрий Зотов © (08.01.02 11:04)
родилось вот такое творение:
function SearchString( const FindStr, SourceString: String;Num: Integer):Integer;
var
FirstP: PChar;
function MyPos(const FindStr, SourceString: PChar;Num: Integer): PChar;
begin
Result := AnsiStrPos(SourceString,FindStr);
if (Result=nil) then Exit;
Inc(Result);
if Num=1 then Exit;
if num>1 then Result := MyPos(FindStr,Result,num-1);
end;
begin Result := 0;
FirstP := PChar(SourceString);
Result := MyPos(PChar(FindStr),PChar(SourceString),Num) - FirstP;
if Result<0 then Result := 0;
end;
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.01.28;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.004 c