Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi String an bestimmter Position prüfen (https://www.delphipraxis.net/46151-string-bestimmter-position-pruefen.html)

Grolle 19. Mai 2005 15:56


String an bestimmter Position prüfen
 
Hallo!
Ich will prüfen ob ein bestimmter String-Wert an
einer bestimmten Position steht. Ich benutze die
Unit jbstr. Habs jetzt mal so probiert, aber es klappt nicht
(nicht genügend Parameter):
Delphi-Quellcode:
if List.Strings[1] := strip('                   X') = 0 then

JasonDX 19. Mai 2005 16:03

Re: String an bestimmter Position prüfen
 
Da dürfte dir Delphi-Referenz durchsuchenpos gute Dienste leisten!

PS: Zuweisungen in einer IF sind in C möglich, aber nicht in Delphi ;)

Grolle 19. Mai 2005 16:24

Re: String an bestimmter Position prüfen
 
Zitat:

Zuweisungen in einer IF sind in C möglich, aber nicht in Delphi :oops:
Habs jetzt so gelöst:
Delphi-Quellcode:
    s := StrToInt(strip('                 X',List.Strings[1]));
    if s = 0 then
THX :thumb:


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:49 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz