muss wohl an der Wärme liegen...
Delphi-Quellcode:
function SameCharsInString(AString : String) : Boolean;
var
i, Count : Integer;
begin
count := length(AString);
if count < 2 then
Result := False
else
begin
i := 2;
Result := True;
while i <= count do
if AString[i] <> AString[1] then
begin
Result := False;
Break;
end
else
inc(i);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if SameCharsInString(Edit1.Text) then
ShowMessage('same Chars')
else
ShowMessage('diff. Chars or to short');
end;