Вниз
Скачать: CL | DM;

Помогите решить проблему   Найти похожие ветки 

 
Johnmen ©   (2002-04-01 13:43) [5]

Вот тебе пример из RxLib :

function WordCount(const S: string; const WordDelims: TCharSet): Integer;
var
SLen, I: Cardinal;
begin
Result := 0;
I := 1;
SLen := Length(S);
while I <= SLen do begin
while (I <= SLen) and (S[I] in WordDelims) do Inc(I);
if I <= SLen then Inc(Result);
while (I <= SLen) and not(S[I] in WordDelims) do Inc(I);
end;
end;


function ExtractWord(N: Integer; const S: string;
const WordDelims: TCharSet): string;
var
I: Integer;
Len: Integer;
begin
Len := 0;
I := WordPosition(N, S, WordDelims);
if I <> 0 then
{ find the end of the current word }
while (I <= Length(S)) and not(S[I] in WordDelims) do begin
{ add the I"th character to result }
Inc(Len);
SetLength(Result, Len);
Result[Len] := S[I];
Inc(I);
end;
SetLength(Result, Len);
end;



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

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.01 c
3-69695
mrl
2002-03-30 14:48
2002.04.22
Фильтрация в Delphi


7-70048
AntBofh
2002-01-23 22:09
2002.04.22
COM порт ... и мой ... Модем


14-70016
Lego
2002-03-16 02:15
2002.04.22
Как выключить вообще комбинацию клавиш ALT + F4?


3-69751
mage
2002-04-02 16:37
2002.04.22
Помогите! не работает функция UPPER в SQL


1-69819
Nikit
2002-04-08 12:58
2002.04.22
save/load to/from file




   Наверх