Function Pos (Const Substr : String;Const S : String) : Byte;
Pos returns the index of Substr in S, if S contains Substr. In case Substr isn't found, 0 is returned.
The search is case-sensitive.
None
Program Example48;
{ Program to demonstrate the Pos function. }
Var
S : String;
begin
S:='The first space in this sentence is at position : ';
Writeln (S,pos(' ',S));
S:='The last letter of the alphabet doesn''t appear in this sentence ';
If (Pos ('Z',S)=0) and (Pos('z',S)=0) then
Writeln (S);
end.