Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
grammar::delim_rule (2 of 2 overloads)

Match a single character from a character set.

Synopsis

Defined in header <boost/url/grammar/delim_rule.hpp>

template<
    class CharSet>
constexpr implementation-defined
delim_rule(
    CharSet const& cs);
Description

This matches exactly one character which belongs to the specified character set. The value is a reference to the character in the underlying buffer, expressed as a string_view. The function squelch may be used to turn this into void instead. If there is no more input, the error code error::need_more is returned.

Value Type
using value_type = string_view;
Example

Rules are used with the function parse.

result< string_view > rv = parse( "X", delim_rule( alpha_chars ) );
Parameters

Name

Description

cs

The character set to use.

See Also

alpha_chars, parse, squelch.

Convenience header <boost/url/grammar.hpp>


PrevUpHomeNext