HomeManualTopicsTypesSymbols

std::get_from_until

reads text from the specified input channel until a specific sentinel is encountered

Parameters

fd
the input channel
sentinel
the sentinel to look for
nth (default: 1)

Results

None

Description

Attention: The sentinel must consist of ASCII characters.

If nth is given then the sentinel must occur exactly nth times.

Sentinels should not overlap!

The function might block until the input channel is ready to deliver more data.

The read data must be in utf8 encoding. The data is converted before returning.

The sentinel is included in the returned string.

This function needs I/O-access rights.

Example

get_from_until! $data STDIN_FILENO '@nl;'

Topic

Input-Output

See also

std::getln_from reads a text line from the specified input channel
std::get_until reads text from the standard input channel until a specific sentinel is encountered