14-01-2016, 02:15 PM
وعليكم السلام
هذا حل
هذا حل
PHP كود :
function text_p(const text, stopdr: string): string;
var
I, P: Cardinal;
SL: TStringList;
begin
Result := '';
SL := TStringList.Create;
try
SL.Text := text;
for I := 0 to SL.Count - 1 do
begin
P := Pos(stopdr, SL[I]);
if P > 0 then
SL[I] := Copy(SL[I], 1, P-1);
end;
Result := SL.Text;
finally
SL.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo2.Text := text_p(Memo1.Text, ';');
end;
سبحان الله وبحمده سبحان الله العظيم

