1//
2// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
3//
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)
6//
7// Official repository: https://github.com/boostorg/beast
8//
9
10#ifndef BOOST_BEAST_STRING_TYPE_HPP
11#define BOOST_BEAST_STRING_TYPE_HPP
12
13#include <boost/beast/core/detail/config.hpp>
14#include <boost/core/detail/string_view.hpp>
15
16namespace boost {
17namespace beast {
18
19/// The type of string view used by the library
20using string_view = boost::core::string_view;
21
22/// The type of `basic_string_view` used by the library
23template<class CharT>
24using basic_string_view =
25 boost::core::basic_string_view<CharT>;
26
27template<class S>
28inline string_view
29to_string_view(const S& s)
30{
31 return string_view(s.data(), s.size());
32}
33
34} // beast
35} // boost
36
37#endif
38

source code of boost/libs/beast/include/boost/beast/core/string_type.hpp