Autor Beitrag
smokydog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Do 11.03.04 16:51 
Also ich habe folgendes:
Ich habe einen String, indem mehrere Gleichzeichen enthalten sind.
Und genau nach dem letzten Gleichzeichen soll er das was dort stand ersetzen durch sagen wir mal TEST.
Ich habe mich leider noch nicht viel mit str funktionen von Delphi beschäftigt, ich bin für jede Hilfe dankbar.

Danke
tmc2004
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140

zuviele
D7,D8
BeitragVerfasst: Do 11.03.04 17:07 
Gib doch mal ein Beispiel für deinen String so auf anhieb würde ich einen StringReplace machen aber ohne Beispiel schwer zu sagen ob das für dich in Frage kommt

gruß
tmc

_________________
it's not a bug it's a feature
iGoA
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 103

Alle Win´s
D5 Prof
BeitragVerfasst: Do 11.03.04 17:10 
Vielleischt soo:
ausblenden Quelltext
1:
2:
3:
  DeinString := 'Ich=mag=Müll';
  delete(DeinString, LastDelimiter('=',DeinString)+1 , 2000);
  DeinString := DeinString + 'TEST';


Die 2000 is ne etwas schmutzige Sache, aber dann sparst Du ne Rechnung.
smokydog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Do 11.03.04 17:12 
danke ich dachte es wäre etwas schwerer zu lösen :)
Aber danke ^^
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 11.03.04 17:21 
man könnte das so machen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
var i:integer;
begin
     for I := length(edit1.text) downto 0 do begin
         if edit1.text [i] = '=' then begin
            edit1.text := copy (edit1.text,0,i) + 'TEST';
            break;
         end;
     end;
end;

wenn im edit1 abcde=xyz=hallo drinsteht macht der Code abcde=xyz=TEST draus.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 11.03.04 17:22 
ach mist. ich war zu spät dran mit meinem post !

_________________
In the beginning was the word.
And the word was content-type: text/plain.