![]() |
String aus einem Wort zwischen 2 Wörtern auslesen
Ich bin öfters mal auf das Problem gestoßen, dass man einen String zwischen 2 Strings auslesen muss.
Diese function macht's möglich. ;)
Delphi-Quellcode:
function GetString(Wort, WortVor, WortNach: string): string;
var IndexVor, IndexNach: integer; i: integer; Ergebnis: string; begin IndexVor := pos(WortVor, Wort); IndexNach := pos(WortNach, Wort); if (IndexVor <> 0) and (IndexNach <> 0) then for i := IndexVor+Length(WortVor) to IndexNach-1 do begin Ergebnis := Ergebnis+Wort[i]; end; Result := Ergebnis; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:24 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