Internet Direct (Indy)
Home
PreviousUpNext
FetchBytes Function

Locates and returns the initial byte values up to the indicated delimiter.

Pascal
function FetchBytes(
    var AInput: TIdBytes; 
    const ADelim: TIdBytes; 
    const ADelete: Boolean = IdFetchDeleteDefault
): TIdBytes;
Parameters 
Description 
AInput 
Values to be searched.
 
ADelim 
Delimiter for the fetched values.
 
ADelete 
Indicates if the fetch values are removed from the original input. 

TIdBytes - Values found in the input up to the delimiter.

FetchBytes is a TIdBytes function used to locate and return the inital values in AInput up to (but not including) the delimiter indicated in ADelim. When ADelim does not appear in AInput, the entire contents of AInput is used in the return value. 

When ADelete contains True, the values in AInput are updated to remove the inital byte values and the delimiter character. If ADelim does not appear in AInput, the entire contents of AInput is deleted. 

FetchBytes is the TIdBytes-specific equivalent of the Fetch function.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.