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



BeitragVerfasst: Mo 26.01.09 23:08 
und nocheinmal nabend :D

Also... Ich versuche aus einem String, der Aus Ziffern, Tab udn Leerzeichen besteht die Zahlen hintereinander raus zu ziehen und in einer Varriablen komplett abzuspeichern...

Sprich: 222 3 12 45
-> 22231245

gibts dazu iwie ne function? :o
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Mo 26.01.09 23:11 
Mit StringReplace Leerzeichen mit Leerstrings ersetzen (?)
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mo 26.01.09 23:13 
Hi :)

Ich sehe das Problem nicht :nixweiss: Mach doch einfach:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var
  S: String;

//..
for i := 1 to Length(S) do begin
  if not (S[i] in [0..9]) then
    Delete(S, i, 1);
end;


Außerdem: www.delphi-forum.de/...hlight=delete+string

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mo 26.01.09 23:27 
user profile iconHidden hat folgendes geschrieben Zum zitierten Posting springen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var
  S: String;

//..
for i := 1 to Length(S) do begin
  if not (S[i] in [0..9]) then
    Delete(S, i, 1);
end;

Und wenn etwas gelöscht werden soll, immer rückwärts laufen ;)

_________________
PROGRAMMER: A device for converting coffee into software.