Einzelnen Beitrag anzeigen

Benutzerbild von Björn Ole
Björn Ole

Registriert seit: 10. Jul 2008
166 Beiträge
 
Delphi XE Professional
 
#4

AW: Text edit algorithmus konzept... Zeichen finden :)

  Alt 31. Dez 2010, 15:37
Delphi-Quellcode:
if Pos('G0', Zeile) > 0 then
  Zeile := Format('M5 %s M3', [Zeile]);
Sollte die Ziffer nach dem G auch variabel sein, zusätzlich darauf prüfen.
Delphi-Quellcode:
p := Pos('G', Zeile);
if (p > 0) and (Length(Zeile) > p) and (CharInSet(Zeile[p+1], ['0'..'9'])) then
  Zeile := Format('M5 %s M3', [Zeile]);

Geändert von Björn Ole (31. Dez 2010 um 15:41 Uhr)
  Mit Zitat antworten Zitat