![]() |
Teil eines Strings
Hallo Allle Zusammen!
Ich habe einen String! z.B ('Draußen Steht ein Haus') Wie kann ich feststellen ob in dem String z.b Das Wort Haus enthalten ist oder nicht. Weiß jem. Rat? MFG Moyyer. |
Re: Teil eines Strings
hallo
Delphi-Quellcode:
x gibt die stelle an an der der gesuchte teil steht
s:='Draußen Steht ein Haus';
x:=pos('Haus',s); wenn also x>0 ist ist der teilstring enthalten cu grumble [edit=sakura]Doppelpost gekillt. Mfg, sakura[/edit] [edit=sakura]Den dritten jetzt auch :roll: Mfg, sakura[/edit] |
Re: Teil eines Strings
siehe delphi-hilfe:
PosEx function Returns the index value of a substring. Unit StrUtils Category string handling routines Delphi syntax: function PosEx(const SubStr, S: string; Offset: Cardinal = 1): Integer; C++ syntax: extern PACKAGE int __fastcall PosEx(const AnsiString SubStr, const AnsiString S, unsigned Offset = 1); Description PosEx returns the index of SubStr in S, beginning the search at Offset. If Offset is 1 (default), PosEx is equivalent to Pos. PosEx returns 0 if SubStr is not found, if Offset is greater than the length of S, or if Offset is less than 1. |
Re: Teil eines Strings
verschoben :arrow: Object-Pascal/Delphi Language
...:cat: ... |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:54 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-2025 by Thomas Breitkreuz