| 1 |
|
|
1 |
|
|
| 2 |
|
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
|
2 |
|
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
|
| 3 |
|
|
3 |
|
|
| 4 |
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
4 |
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
| 5 |
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
5 |
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
| 6 |
|
|
6 |
|
|
| 7 |
|
// Official repository: https://github.com/boostorg/url
|
7 |
|
// Official repository: https://github.com/boostorg/url
|
| 8 |
|
|
8 |
|
|
| 9 |
|
|
9 |
|
|
| 10 |
|
#ifndef BOOST_URL_IGNORE_CASE_HPP
|
10 |
|
#ifndef BOOST_URL_IGNORE_CASE_HPP
|
| 11 |
|
#define BOOST_URL_IGNORE_CASE_HPP
|
11 |
|
#define BOOST_URL_IGNORE_CASE_HPP
|
| 12 |
|
|
12 |
|
|
| 13 |
|
#include <boost/url/detail/config.hpp>
|
13 |
|
#include <boost/url/detail/config.hpp>
|
| 14 |
|
|
14 |
|
|
| 15 |
|
|
15 |
|
|
| 16 |
|
|
16 |
|
|
| 17 |
|
|
17 |
|
|
| 18 |
|
namespace implementation_defined {
|
18 |
|
namespace implementation_defined {
|
| 19 |
|
|
19 |
|
|
| 20 |
|
|
20 |
|
|
| 21 |
|
|
21 |
|
|
| 22 |
|
/** Ignore case when comparing
|
22 |
|
/** Ignore case when comparing
|
| 23 |
|
|
23 |
|
|
| 24 |
|
This value may be optionally passed to
|
24 |
|
This value may be optionally passed to
|
| 25 |
|
functions accepting a parameter of type
|
25 |
|
functions accepting a parameter of type
|
| 26 |
|
@ref ignore_case_param to indicate that
|
26 |
|
@ref ignore_case_param to indicate that
|
| 27 |
|
comparisons should be case-insensitive.
|
27 |
|
comparisons should be case-insensitive.
|
| 28 |
|
|
28 |
|
|
| 29 |
|
|
29 |
|
|
| 30 |
|
implementation_defined::ignore_case_t
|
30 |
|
implementation_defined::ignore_case_t
|
| 31 |
|
|
31 |
|
|
| 32 |
|
|
32 |
|
|
| 33 |
|
/** An optional parameter to determine case-sensitivity
|
33 |
|
/** An optional parameter to determine case-sensitivity
|
| 34 |
|
|
34 |
|
|
| 35 |
|
Functions may use parameters of this type
|
35 |
|
Functions may use parameters of this type
|
| 36 |
|
to allow the user to optionally indicate
|
36 |
|
to allow the user to optionally indicate
|
| 37 |
|
that comparisons should be case-insensitive
|
37 |
|
that comparisons should be case-insensitive
|
| 38 |
|
when the value @ref ignore_case is passed.
|
38 |
|
when the value @ref ignore_case is passed.
|
| 39 |
|
|
39 |
|
|
| 40 |
|
|
40 |
|
|
| 41 |
|
|
41 |
|
|
| 42 |
|
|
42 |
|
|
| 43 |
|
|
43 |
|
|
| 44 |
|
|
44 |
|
|
| 45 |
|
/** True if an algorithm should ignore case
|
45 |
|
/** True if an algorithm should ignore case
|
| 46 |
|
|
46 |
|
|
| 47 |
|
Functions accepting a parameter of type
|
47 |
|
Functions accepting a parameter of type
|
| 48 |
|
`ignore_case_param` can check `value`
|
48 |
|
`ignore_case_param` can check `value`
|
| 49 |
|
to determine if the caller has indicated
|
49 |
|
to determine if the caller has indicated
|
| 50 |
|
that comparisons should ignore case.
|
50 |
|
that comparisons should ignore case.
|
| 51 |
|
|
51 |
|
|
| 52 |
|
|
52 |
|
|
| 53 |
|
|
53 |
|
|
| 54 |
|
|
54 |
|
|
| 55 |
|
|
55 |
|
|
| 56 |
|
|
56 |
|
|
| 57 |
|
By default, comparisons are
|
57 |
|
By default, comparisons are
|
| 58 |
|
|
58 |
|
|
| 59 |
|
|
59 |
|
|
| 60 |
|
|
60 |
|
|
| 61 |
|
This function performs case-sensitive
|
61 |
|
This function performs case-sensitive
|
| 62 |
|
comparisons when called with no
|
62 |
|
comparisons when called with no
|
| 63 |
|
|
63 |
|
|
| 64 |
|
|
64 |
|
|
| 65 |
|
void f( ignore_case_param = {} );
|
65 |
|
void f( ignore_case_param = {} );
|
| 66 |
|
|
66 |
|
|
| 67 |
|
|
67 |
|
|
| 68 |
|
|
68 |
|
|
| 69 |
|
ignore_case_param() noexcept = default;
|
69 |
|
ignore_case_param() noexcept = default;
|
| 70 |
|
|
70 |
|
|
| 71 |
|
|
71 |
|
|
| 72 |
|
|
72 |
|
|
| 73 |
|
Construction from @ref ignore_case
|
73 |
|
Construction from @ref ignore_case
|
| 74 |
|
indicates that comparisons should
|
74 |
|
indicates that comparisons should
|
| 75 |
|
|
75 |
|
|
| 76 |
|
|
76 |
|
|
| 77 |
|
The first parameter to this function
|
77 |
|
The first parameter to this function
|
| 78 |
|
|
78 |
|
|
| 79 |
|
|
79 |
|
|
| 80 |
|
|
80 |
|
|
| 81 |
|
|
81 |
|
|
| 82 |
|
When @ref ignore_case is passed as
|
82 |
|
When @ref ignore_case is passed as
|
| 83 |
|
an argument, this function ignores
|
83 |
|
an argument, this function ignores
|
| 84 |
|
case when performing comparisons:
|
84 |
|
case when performing comparisons:
|
| 85 |
|
|
85 |
|
|
| 86 |
|
void f( ignore_case_param(ignore_case) );
|
86 |
|
void f( ignore_case_param(ignore_case) );
|
| 87 |
|
|
87 |
|
|
| 88 |
|
|
88 |
|
|
| 89 |
|
|
89 |
|
|
| 90 |
|
|
90 |
|
|
| 91 |
|
implementation_defined::ignore_case_t) noexcept
|
91 |
|
implementation_defined::ignore_case_t) noexcept
|
| 92 |
|
|
92 |
|
|
| 93 |
|
|
93 |
|
|
| 94 |
|
|
94 |
|
|
| 95 |
|
|
95 |
|
|
| 96 |
|
/** True if an algorithm should ignore case
|
96 |
|
/** True if an algorithm should ignore case
|
| 97 |
|
|
97 |
|
|
| 98 |
|
Values of type `ignore_case_param`
|
98 |
|
Values of type `ignore_case_param`
|
| 99 |
|
evaluate to true when constructed
|
99 |
|
evaluate to true when constructed
|
| 100 |
|
with the constant @ref ignore_case.
|
100 |
|
with the constant @ref ignore_case.
|
| 101 |
|
Otherwise, they are default-constructed
|
101 |
|
Otherwise, they are default-constructed
|
| 102 |
|
|
102 |
|
|
| 103 |
|
|
103 |
|
|
| 104 |
|
@return `true` if case should be ignored
|
104 |
|
@return `true` if case should be ignored
|
| 105 |
|
|
105 |
|
|
| 106 |
|
|
106 |
|
|
| 107 |
|
|
107 |
|
|
| 108 |
|
|
108 |
|
|
| 109 |
|
|
109 |
|
|
| 110 |
|
|
110 |
|
|
| 111 |
|
|
111 |
|
|
| 112 |
|
|
112 |
|
|
| 113 |
|
|
113 |
|
|
| 114 |
|
|
114 |
|
|
| 115 |
|
|
115 |
|
|
| 116 |
|
|
116 |
|
|