Previous: 4.67.2.60. Pi function To the Table of Contents Next: 4.67.2.62. Pred function
4.67.2.60. Pi function Table of Contents 4.67.2.62. Pred function

- 4.67.2.61. -
Table of Contents
4. Standard Units
4.67. System - Built-in routines
4.67.2. System Unit Procedures and Functions
4.67.2.61. Pos function


4.67.2.61. Pos function

Targets: MS-DOS, OS/2, Win32


System Unit

Searches for a substring in a string.

Declaration:
function Pos(SubStr: String; S: String): Byte;
Remarks:
Pos returns the index of the first character of SubStr in S. If SubStr is not found then Pos returns zero.

Example:
 Index := Pos('23', '123'); // Index is 2
 Index := Pos('z', 'ABC'); // Index is 0



Previous: 4.67.2.60. Pi function To the Table of Contents Next: 4.67.2.62. Pred function
4.67.2.60. Pi function Table of Contents 4.67.2.62. Pred function

- 4.67.2.61. -