Programming |  Pascal Programming |  Pos Function

function Pos(srch, str)

This function returns the position in the string str at which the string srch is found. It returns 0 if srch was not found in str. For example,

i := Pos('exec', 'autoexec.bat');

will cause i to have the value 5, while

i := Pos('gremlin', 'halloween');

will cause i to have the value 0. This is similar to StrScan