istream_extract_matched_data()#
Extracts the matched data from the istream_h. The function returns a pointer to the matched data and resets the completion status of the stream.
Prototype
PUBLIC char *istream_extract_matched_data(
istream_h istream,
size_t *len
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
The handle to the istream from which matched data will be extracted. |
|
|
A pointer to a variable where the length of the matched data will be stored. Can be |
Return Value
Returns a pointer to the matched data if successful.
Returns NULL if the istream is invalid, incomplete, or if there is no gbuffer_t * associated with the istream.
Notes
The matched data is removed from the associated
gbuffer_t *.After extracting the data, the
istreamcompletion status is reset (completed = FALSE).This function logs an error if the
istreamisNULL, not completed, or has no validgbuffer_t *.
Example Usage This function can be used to retrieve and process data from an istream once it has been matched by a delimiter or a byte threshold.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples