Autor Beitrag
Handycommander
ontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1054

Windows XP Pro, Vista
Visual Studio 2008
BeitragVerfasst: Do 24.03.05 10:30 
Hi!

ich möchte aus einem string, der z.b. so lautet könnte: '90
da möchte ich jetzt das erste Zeichen entfernen, also das '

wie kann ich das machen?

danke

tobias
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Do 24.03.05 10:43 
versuch es mal mit
ausblenden Delphi-Quelltext
1:
Delete('0190', 1, 1)					
opfer.der.genauigkeit
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754
Erhaltene Danke: 1



BeitragVerfasst: Do 24.03.05 10:44 
Guck mal hier.
www.delphi-forum.de/viewtopic.php?t=38668

//Edit:
Ok, der Thread trifft dein Problem nicht ganz, aber im Prinzip..

_________________
Stellen Sie sich bitte Zirkusmusik vor.


Zuletzt bearbeitet von opfer.der.genauigkeit am Do 24.03.05 10:46, insgesamt 2-mal bearbeitet
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 24.03.05 10:45 
wird so nicht gehen, da delete eine variable erwartet. (also bei mir jedenfalls).
es muss also so lauten:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var str:string;
begin
  str := 'test';
  delete (str,1,1);
end;

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Cube85
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50



BeitragVerfasst: Do 24.03.05 10:47 
Andere Möglichkeit:

Stringreplace(StringVar,'deinZeichen','deinNeuesZeichen',[rfReplaceAll, rfIgnoreCase]);

Damit werden im String StringVar alle deinZeichen durch deinNeuesZeichen ersetzt.
Kannst auch mehrer Zeichen machen, oder halt auch nichts also deinZeihcen durch nichts ersetzen ( '' )
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Do 24.03.05 10:48 
ja das stimmt, aber ich muss zugeben ich war zu faul die eine Zeile mehr zu schreiben, da er das auch selber mitbekommen müsste. :wink: