Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Strings bearbeiten (https://www.delphipraxis.net/15529-strings-bearbeiten.html)

the_seed 30. Jan 2004 13:17


Strings bearbeiten
 
Hi habe ein string der ein paar zeilen enthält, wie kann ich die ersten beiden buchstaben von dem string löschen bzw. wie kann ich bestimmte zeichen rausfiltern?

sakura 30. Jan 2004 13:32

Re: Strings bearbeiten
 
Da gibt es in der Hilfe von Delphi (und hier auch) viel zu finden: Hier im Forum suchendelete, Hier im Forum suchenpos, Hier im Forum suchencopy

...:cat:...

the_seed 30. Jan 2004 15:14

Re: Strings bearbeiten
 
srry hab die links von dir durchgeschaut aber irgendwie finde ich nix brauchbares :(

Benedikt 30. Jan 2004 15:20

Re: Strings bearbeiten
 
Hi,

dann guck dir doch einfach mal die Delphi-Hilfe zu den von Sakura genannten Funktionen ein.
Um die ersten zwei Buchstaben abzuschneiden, sollte dich besonders Copy interessieren.

sakura 30. Jan 2004 15:21

Re: Strings bearbeiten
 
Ich sagte auch, daß Du auch mal die Delphi Hilfe nutzen solltest :roll:

ZU DELETE
Delphi syntax:
procedure Delete(var S: string; Index, Count:Integer);

Description

In Delphi code, Delete removes a substring of Count characters from string S starting with S[Index]. S is a string-type variable. Index and Count are integer-type expressions. If index is larger than the length of the string or less than 1, no characters are deleted. If count specifies more characters than remain starting at the index, Delete removes the rest of the string. If count is less than or equal to 0, no characters are deleted.


ZU POS
Delphi syntax:
function Pos(Substr: string; S: string): Integer;

Description

In Delphi, Pos searches for a substring, Substr, in a string, S. Substr and S are string-type expressions. Pos searches for Substr within S and returns an integer value that is the index of the first character of Substr within S. Pos is case-sensitive. If Substr is not found, Pos returns zero. The PosEx function is similar to Pos, but provides additional features and can be used in C++ code.


...:cat:...


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:00 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