help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Procedures and functions] Reference for unit 'strings' (#rtl)

strscan

Find first occurrence of a character in a null-terminated string.

Declaration

Source position: strings.pp line 63

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

StrRScan

  

Find last occurrence of a character in a null-terminated string.

StrPos

  

Search for a null-terminated substring in a null-terminated string

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505