blob: 06edca19691b042cf498e6936cd09bdaea956e5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_STRING_HPP
#define BOOST_BEAST_STRING_HPP
#include <boost/beast/core/detail/config.hpp>
#include <boost/beast/core/string_type.hpp>
namespace boost {
namespace beast {
/** Returns `true` if two strings are equal, using a case-insensitive comparison.
The case-comparison operation is defined only for low-ASCII characters.
@param lhs The string on the left side of the equality
@param rhs The string on the right side of the equality
*/
BOOST_BEAST_DECL
bool
iequals(
beast::string_view lhs,
beast::string_view rhs);
/** A case-insensitive less predicate for strings.
The case-comparison operation is defined only for low-ASCII characters.
*/
struct iless
{
BOOST_BEAST_DECL
bool
operator()(
string_view lhs,
string_view rhs) const;
};
/** A case-insensitive equality predicate for strings.
The case-comparison operation is defined only for low-ASCII characters.
*/
struct iequal
{
bool
operator()(
string_view lhs,
string_view rhs) const
{
return iequals(lhs, rhs);
}
};
} // beast
} // boost
#ifdef BOOST_BEAST_HEADER_ONLY
#include <boost/beast/core/impl/string.ipp>
#endif
#endif
|