HomeManualTopicsTypesSymbols

std_types::string/std::search

searches for the start of the string within the stream

Parameters

self
stream
nth (default: 1)
search for the nth occurrence of *self* instead for the first one

Results

None

Description

Attempts to find the start of the string within the stream. If the match is successful the found position (one based) and the length of the string is returned. Otherwise the returned values for the position and the length are std::undefined.

If nth is specified then the nth occurence of the string is looked for. If there are not at least n matches for expr within str then the returned values for the position and the length are std::undefined.

Topic

Strings

Implements

std::search search from the grammar object from the start or end of the specified string

See also

std_types::string/std::match matches the start of the stream with the string