|
|
|||
File indexing completed on 2025-12-16 09:43:58
0001 // 0002 // Copyright (c) 2016-2019 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/beast 0008 // 0009 0010 #ifndef BOOST_BEAST_STRING_HPP 0011 #define BOOST_BEAST_STRING_HPP 0012 0013 #include <boost/beast/core/detail/config.hpp> 0014 #include <boost/beast/core/string_type.hpp> 0015 0016 namespace boost { 0017 namespace beast { 0018 0019 /** Returns `true` if two strings are equal, using a case-insensitive comparison. 0020 0021 The case-comparison operation is defined only for low-ASCII characters. 0022 0023 @param lhs The string on the left side of the equality 0024 0025 @param rhs The string on the right side of the equality 0026 */ 0027 BOOST_BEAST_DECL 0028 bool 0029 iequals( 0030 beast::string_view lhs, 0031 beast::string_view rhs); 0032 0033 /** A case-insensitive less predicate for strings. 0034 0035 The case-comparison operation is defined only for low-ASCII characters. 0036 0037 As of C++14, containers using this class as the `Compare` type will take part 0038 in heterogeneous lookup if the search term is implicitly convertible to 0039 @ref string_view. 0040 */ 0041 struct iless 0042 { 0043 BOOST_BEAST_DECL 0044 bool 0045 operator()( 0046 string_view lhs, 0047 string_view rhs) const; 0048 0049 using is_transparent = void; 0050 }; 0051 0052 /** A case-insensitive equality predicate for strings. 0053 0054 The case-comparison operation is defined only for low-ASCII characters. 0055 0056 As of C++14, containers using this class as the `Compare` type will take part 0057 in heterogeneous lookup if the search term is implicitly convertible to 0058 @ref string_view. 0059 */ 0060 struct iequal 0061 { 0062 bool 0063 operator()( 0064 string_view lhs, 0065 string_view rhs) const 0066 { 0067 return iequals(lhs, rhs); 0068 } 0069 0070 using is_transparent = void; 0071 }; 0072 0073 } // beast 0074 } // boost 0075 0076 #ifdef BOOST_BEAST_HEADER_ONLY 0077 #include <boost/beast/core/impl/string.ipp> 0078 #endif 0079 0080 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|