Sign in Join
FPDoc Onlineexperiment

AnsiStrPos function

In unit sysutils

Return position of one null-terminated substring in another.

Declaration

pascal
function AnsiStrPos(str: PAnsiChar; substr: PAnsiChar): PAnsiChar

Description

AnsiStrPos returns a pointer to the first occurrence of SubStr in Str. If SubStr does not occur in Str then Nil is returned.

Errors

An access violation may occur if either Str or SubStr point to invalid memory.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.