next up previous contents index
Next: StrUpper Up: Functions and procedures. Previous: StrRScan

StrScan

   

Declaration:

Function StrScan (P : PChar; C : Char) : PChar;

Description:

Returns a pointer to the first occurrence of the character C in the null-terminated string P. If C does not occur, returns Nil.

Errors:

None.

See also:

Pos (), StrRScan, StrPos

Example
Program Example13;

Uses strings;

{ Program to demonstrate the StrScan and StrRScan functions. }

Const P : PChar = 'This is a PCHAR string.'; 
      S : Char = 's' ;

begin
  Writeln ('P, starting from first ''s'' : ',StrScan(P,s));
  Writeln ('P, starting from last ''s'' : ',StrRScan(P,s));
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998