Skip to content

Commit

Permalink
Issue #16 - bug fix - last char of last field is dropped by TCWOPS.De…
Browse files Browse the repository at this point in the history
…limit
  • Loading branch information
w7sst committed Sep 16, 2022
1 parent 975550f commit acba65f
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions CWOPS.pas
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,11 @@ function TCWOPS.IsNum(Num: String): Boolean;
procedure TCWOPS.Delimit(var AStringList: TStringList; const AText: string);
const
DelimitChar: char= ',';
var
i, l: integer;
s: string;
begin
AStringList.Clear;
l:= Length(AText);
s:= '';
for i := 1 to l do begin
if(AText[i] = DelimitChar) or (i=l) then begin
AStringList.Add(s);
s:= '';
end
else
s:= s + AText[i];
end;
AStringList.Delimiter := DelimitChar;
AStringList.StrictDelimiter := True;
AStringList.DelimitedText := AText;
end;

end.
Expand Down

0 comments on commit acba65f

Please sign in to comment.