Código
Var
I : Integer;
Begin
InitPos := Min (Max (InitPos, 1), Length(S));
if Mode = mdDescend Then
I := -1
else
I := 1;
while ((InitPos <= Length(S)) And (InitPos > 0) And (S[InitPos] <> ' ')) Do
Inc (InitPos, I);
while ((InitPos <= Length(S)) And (InitPos > 0) And (S[InitPos] = ' ')) Do
Inc (InitPos, I);
if InitPos > Length (S) Then
InitPos := 0;
NextPosWord := InitPos;
End;
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009