strWordPos now kills extra word spacers like strWordGet does. Much more usable now.

This commit is contained in:
mysticbbs 2012-03-03 21:52:56 -05:00
parent 679e25ab39
commit 82abcd26b6
1 changed files with 9 additions and 0 deletions

View File

@ -241,9 +241,18 @@ Begin
While Count < Num Do Begin While Count < Num Do Begin
Temp := Pos(Ch, Str); Temp := Pos(Ch, Str);
If Temp = 0 Then Exit; If Temp = 0 Then Exit;
Delete (Str, 1, Temp); Delete (Str, 1, Temp);
While Str[1] = Ch Do Begin
Delete (Str, 1, 1);
Inc (Temp);
End;
Inc (Count); Inc (Count);
Inc (Result, Temp); Inc (Result, Temp);
End; End;
End; End;