Hello, how can I improve the code so that it does not remove the period at the end of sentences?
procedure TForm1.Button5Click(Sender: TObject);
var
SL: TStringList;
begin
SL := TStringList.Create;
try
Split('.', Memo1.Lines.Text, SL);
Memo1.Lines.BeginUpdate;
Memo1.Lines.Text := SL.Text;
Memo1.Lines.EndUpdate;
finally
SL.Free;
end;
end;
procedure TForm1.Split(const Delimiter: Char; Input: string; const Strings: TStrings);
begin
Assert(Assigned(Strings));
Strings.Clear;
Strings.StrictDelimiter := True;
Strings.Delimiter := Delimiter;
Strings.DelimitedText := Input;
end;