ViaThinkSoft CodeLib
This article is in:
CodeLib → Programming aids → Delphi
function Klammer(s: string): string;
var
i: integer;
rec: boolean;
begin
rec := false;
result := '';
for i := 1 to Length(s) do
begin
if copy(s,i,1) = ')' then
begin
rec := false;
end;
if rec then
begin
result := result + copy(s,i,1);
end;
if copy(s,i,1) = '(' then
begin
rec := true;
end;
end;
end;
Daniel Marschall
ViaThinkSoft Co-Founder
ViaThinkSoft Co-Founder