Autor Beitrag
th3Thr1ll3r
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 31

Win XP Prof
Delphi 6 Pers.
BeitragVerfasst: Mo 31.10.05 08:57 
Wie kann ich bei einer String kontrollieren, ob diese ein best. Endung hat, z.B. .jpg!!

greetZ

th3Thr1l3r
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Mo 31.10.05 09:01 
Hallo und Willkommen in der Ecke! :wink2:

Die Antwort ist ganz einfach:
ausblenden Delphi-Quelltext
1:
2:
If ExtractFileExt (String) = '.jpg' Then
  // Mache etwas!


Lg Martin

_________________
Ein Nutzer der Ecke ;-)
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 31.10.05 09:02 
Mit der Funktion ExtractFileExt(meinString)

Edit: Zu langsam...

_________________
We are, we were and will not be.
th3Thr1ll3r Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 31

Win XP Prof
Delphi 6 Pers.
BeitragVerfasst: Mo 31.10.05 09:05 
Thx

th3Thr1ll3r