Files
boost_beast/include/boost/beast/core/string.hpp
T

69 lines
1.5 KiB
C++
Raw Normal View History

2017-06-16 09:38:53 -07:00
//
2019-02-21 07:00:31 -08:00
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
2017-06-16 09:38:53 -07:00
//
// 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)
//
2017-07-20 13:40:34 -07:00
// Official repository: https://github.com/boostorg/beast
//
2017-06-16 09:38:53 -07:00
2017-07-20 13:40:34 -07:00
#ifndef BOOST_BEAST_STRING_HPP
#define BOOST_BEAST_STRING_HPP
2017-06-16 09:38:53 -07:00
2019-06-19 09:26:15 -07:00
#include <boost/beast/core/detail/config.hpp>
#include <boost/beast/core/string_type.hpp>
2017-06-16 09:38:53 -07:00
2017-07-20 13:40:34 -07:00
namespace boost {
2017-06-16 09:38:53 -07:00
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
*/
2019-06-12 03:55:30 +02:00
BOOST_BEAST_DECL
2017-06-16 09:38:53 -07:00
bool
iequals(
2017-07-12 16:35:52 -07:00
beast::string_view lhs,
2019-06-12 03:55:30 +02:00
beast::string_view rhs);
2017-06-16 09:38:53 -07:00
2017-06-26 10:46:17 -07:00
/** A case-insensitive less predicate for strings.
2017-06-16 09:38:53 -07:00
The case-comparison operation is defined only for low-ASCII characters.
*/
struct iless
{
2019-06-12 03:55:30 +02:00
BOOST_BEAST_DECL
2017-06-16 09:38:53 -07:00
bool
operator()(
2017-07-12 16:35:52 -07:00
string_view lhs,
2019-06-12 03:55:30 +02:00
string_view rhs) const;
2017-06-16 09:38:53 -07:00
};
2017-06-26 10:46:17 -07:00
/** A case-insensitive equality predicate for strings.
2017-06-16 09:38:53 -07:00
The case-comparison operation is defined only for low-ASCII characters.
*/
struct iequal
{
bool
operator()(
2017-07-12 16:35:52 -07:00
string_view lhs,
string_view rhs) const
2017-06-16 09:38:53 -07:00
{
return iequals(lhs, rhs);
}
};
} // beast
2017-07-20 13:40:34 -07:00
} // boost
2017-06-16 09:38:53 -07:00
2019-06-12 03:55:30 +02:00
#ifdef BOOST_BEAST_HEADER_ONLY
#include <boost/beast/core/impl/string.ipp>
#endif
2017-06-16 09:38:53 -07:00
#endif