:relfileprefix: ../../../
[#boost-urls-grammar-delim_rule-0a]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/grammar.adoc[pass:[grammar]]::delim_rule


Match a single character from a character set


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/delim_rule.hpp#L230[boost/url/grammar/delim_rule.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
template<class CharSet>
constexpr
pass:q[_implementation-defined_]
delim_rule(CharSet const& cs) noexcept;
----

=== 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
`core::string_view`. The function
xref:boost/urls/grammar/squelch.adoc[squelch]
may be used to turn this into `void` instead.
If there is no more input, the error code
xref:boost/urls/grammar/error/need_more.adoc[error::need_more]
is returned.
[,cpp]
----
using value_type = core::string_view;
----

=== Rules are used with the function

xref:boost/urls/grammar/parse-02.adoc[parse]
.
[,cpp]
----
system::result< core::string_view > rv = parse( "X", delim_rule( alpha_chars ) );
----





=== Parameters

|===
| Name | Description 

| *cs*
| 
The character set to use.

|===




=== See Also


xref:boost/urls/grammar/alpha_chars.adoc[alpha_chars]
,
xref:boost/urls/grammar/parse-02.adoc[parse]
,
xref:boost/urls/grammar/squelch.adoc[squelch]
.



