Thema: Delphi Char from set in string?

Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Char from set in string?

  Alt 6. Jan 2013, 11:34
Delphi-Version: 2010
Delphi-Quellcode:
const
  ParamSeps = ['=', ':', '?'];
Delphi-Quellcode:
P := Pos('=', AIn);
if P = 0 then
begin
  P := Pos(':', AIn);
  
  if P = 0 then
    P := Pos('?', AIn)
  ;
end;
Is possible to check if char is in text using above set instead if-block and Pos()?
  Mit Zitat antworten Zitat