![]() |
|
|||
File indexing completed on 2025-09-17 08:52:41
0001 // 0002 // Copyright (c) 2021 Vinnie Falco (vinnie dot falco at gmail dot com) 0003 // 0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying 0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 0006 // 0007 // Official repository: https://github.com/boostorg/url 0008 // 0009 0010 #ifndef BOOST_URL_GRAMMAR_VCHARS_HPP 0011 #define BOOST_URL_GRAMMAR_VCHARS_HPP 0012 0013 #include <boost/url/detail/config.hpp> 0014 #include <boost/url/grammar/detail/charset.hpp> 0015 0016 namespace boost { 0017 namespace urls { 0018 namespace grammar { 0019 0020 /** The set of visible characters 0021 0022 @par Example 0023 Character sets are used with rules and the 0024 functions @ref find_if and @ref find_if_not. 0025 @code 0026 system::result< core::string_view > rv = parse( "JohnDoe", token_rule( vchars ) ); 0027 @endcode 0028 0029 @par BNF 0030 @code 0031 VCHAR = 0x21-0x7E 0032 ; visible (printing) characters 0033 @endcode 0034 0035 @par Specification 0036 @li <a href="https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1" 0037 >B.1. Core Rules (rfc5234)</a> 0038 0039 @see 0040 @ref find_if, 0041 @ref find_if_not, 0042 @ref parse, 0043 @ref token_rule. 0044 */ 0045 #ifdef BOOST_URL_DOCS 0046 constexpr __implementation_defined__ vchars; 0047 #else 0048 namespace implementation_defined { 0049 struct vchars_t 0050 { 0051 constexpr 0052 bool 0053 operator()(char c) const noexcept 0054 { 0055 return c >= 0x21 && c <= 0x7e; 0056 } 0057 0058 #ifdef BOOST_URL_USE_SSE2 0059 char const* 0060 find_if( 0061 char const* first, 0062 char const* last) const noexcept 0063 { 0064 return detail::find_if_pred( 0065 *this, first, last); 0066 } 0067 0068 char const* 0069 find_if_not( 0070 char const* first, 0071 char const* last) const noexcept 0072 { 0073 return detail::find_if_not_pred( 0074 *this, first, last); 0075 } 0076 #endif 0077 }; 0078 } // implementation_defined 0079 0080 /** The set of visible characters 0081 0082 @par Example 0083 Character sets are used with rules and the 0084 functions @ref find_if and @ref find_if_not. 0085 @code 0086 system::result< core::string_view > rv = parse( "JohnDoe", token_rule( vchars ) ); 0087 @endcode 0088 0089 @par BNF 0090 @code 0091 VCHAR = 0x21-0x7E 0092 ; visible (printing) characters 0093 @endcode 0094 0095 @par Specification 0096 @li <a href="https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1" 0097 >B.1. Core Rules (rfc5234)</a> 0098 0099 @see 0100 @ref find_if, 0101 @ref find_if_not, 0102 @ref parse, 0103 @ref token_rule. 0104 */ 0105 constexpr implementation_defined::vchars_t vchars{}; 0106 #endif 0107 0108 } // grammar 0109 } // urls 0110 } // boost 0111 0112 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |