Topic Path: Symbol Reference > Functions > PosBytes Function
ContentsIndexHome
PreviousUpNext
PosBytes Function

Indicates the position where bytes values appear in the source byte values.

File
function PosBytes(
    const SubBytes: TIdBytes; 
    const SBytes: TIdBytes
): integer;
Parameters 
Description 
SubBytes 
Byte value to locate.
 
SBytes 
Byte values to be searched. 

Integer - Position of SubBytes in the SBytes byte values.

PosBytes is an Integer function used to indicates the position where bytes values in SubBytes appear in the source byte values indicated in SBytes. 

The return value for the function is the offset position where SubBytes appears in SBytes and begins with the value 0 (zero). The return value will contain -1 if SubBytes cannot be located in the SBytes byte values. 

PosBytes uses SameArray in its implementation to perform comparision of the byte values in SubBytes and SBytes.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.