Autor Beitrag
soisseteben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111

Win XP
D7
BeitragVerfasst: So 10.09.06 17:38 
Gibt es eine Funktion, die mir zurückliefert, ob ein String nur aus Leerzeichen besteht? Ich möchte dazu nicht gern alle Chars einzeln prüfen.


thanks a lot

soisset
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 10.09.06 17:40 
Wie wärs, wenn du mit trim alle Leerzeichen am Anfang und am Ende entfernst und dann auf Leerstring prüfst?

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: So 10.09.06 17:41 
ausblenden Delphi-Quelltext
1:
2:
if Trim(DeinString) = '' then //bestehen alle Zeichen aus [#1..#32] (#32 ist das Leerzeichen, 
  //und der Rest sind weitere nicht anzeigbare Steuerzeichen)


EDIT: :roll:

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
soisseteben Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111

Win XP
D7
BeitragVerfasst: So 10.09.06 17:44 
genau sowas, danke