Thema: Delphi string manipulieren

Einzelnen Beitrag anzeigen

acordo

Registriert seit: 22. Aug 2003
Ort: Tief im Westen...
10 Beiträge
 
Delphi 4 Professional
 
#9

Re: string manipulieren

  Alt 13. Feb 2005, 11:07
DANKE !!

Hier mein funktionierendes Endresultat :

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  oldIP : String;
  newIP : String;
  IPLast : String
  ndx : Integer;
begin
  oldIP := '192.168.1.23';
  for ndx := Length(oldIP) downto 1 do
    if (oldIP[ndx] = '.') then
    begin
      newIP := Copy (oldIP,1,ndx);
      IPLast:= Copy(oldIP,ndx+1,Length(oldIP)-ndx);
      break;
    end;
  Label1.Caption := newIP+(IntToStr(StrToInt(IPLast)+WERT));
end;
  Mit Zitat antworten Zitat