Determines the position of a string in a pointer to a memory buffer.
function SubStrPos(substr: String; MemBuff: PChar; MemorySize: Integer): Integer;
Parameters
substr: String
Value to be located in the memory buffer.
MemBuff: PChar
Memory buffer to be examined.
MemorySize: Integer
Size of the memory buffer.
Returns
Integer - Position of the substring, or 0 when not found.
Description
SubStrPos is an Integer function that represents the position of the String data type Substr in the pointer to a character memory buffer specified by MemBuff. If the length of Substr is longer than the value in MemorySize, the return value for the function is 0 (zero).
The return value for SubStrPos is the one-based position of the substring, or 0 when not found.