Indy 9
MemoryPos
Unit: IdGlobal
Returns the index of substring that occurs in values for a memory buffer.
function MemoryPos(const ASubStr: String; MemBuff: PChar; MemorySize: Integer): Integer;
Unit
IdGlobal
Parameters
const ASubStr: String
Value to be located in the memory buffer.
MemBuff: PChar
Memory buffer to be searched.
MemorySize: Integer
Size of the memory buffer to be searched.
Return Value
Integer - Position of the substring the memory buffer.
Description
MemoryPos is an Integer function used to determine the index value of the first character in a specified substring that occurs in a memory buffer.

ASubStr is the string value to be located in the memory buffer specified by the PChar MemBuff. MemoryPos searches for ASubStr within MemBuff, and returns an integer value that is the index of the first character of ASubStr within MemBuff.

MemoryPos is case-sensitive. If ASubStr is not found, MemoryPos returns zero.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.