Autor Beitrag
delphistart
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 119



BeitragVerfasst: Sa 06.10.07 15:39 
Hallo,

Ich suche etwas das ist wiepos(';',string)wo ich aber auch nach dem Index des 12 Semikolons oder irgend einem anderen suchen kann.

Danke vorab für die Hilfe!
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Sa 06.10.07 15:45 
aus PosEx selber basteln, :wink:

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
delphistart Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 119



BeitragVerfasst: Sa 06.10.07 15:47 
Vielen Dank!!! Das es so einfach ist hätte ich nicht gedacht!
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: Sa 06.10.07 15:47 
Wenns einzelne Zeichen sind, kann man das in etwa so machen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
function GetXString(aString: string; SearchChar: Char; SearchCount: Integer): Integer;
var found, i: integer;
begin
  found := 0;
  result := 0;
  for i := 1 to length(aString) do
  begin
    if aString[i] = SearchChar then
      inc(found);
    if found = SearchCount then
    begin
      result := i;
      break;
    end;
  end;
end;


Ansonsten: PosEx.

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



BeitragVerfasst: Sa 06.10.07 15:58 
War doch nicht so einfach... Habe nur Delphi 2005 und da geht PosEx leider noch nicht.
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: Sa 06.10.07 16:01 
PosEx gibbets schon bei D7 Personal, also bei D2005 bestimmt auch. Hast du die Unit StrUtils eingebunden?

_________________
We are, we were and will not be.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 06.10.07 16:02 
Klar, gibts, aber du musst die Unit StrUtils in die uses schreiben, und für ältere Versionen von Delphi gibts hier auch die entsprechende Funktion ganz kurz nachgebaut:
www.dsdt.info/tutori...verarbeitung/?page=2