Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:27

0001 //
0002 // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.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/url
0008 //
0009 
0010 #ifndef BOOST_URL_DETAIL_FORMAT_HPP
0011 #define BOOST_URL_DETAIL_FORMAT_HPP
0012 
0013 #include <boost/url/detail/format_args.hpp>
0014 #include <boost/url/detail/pattern.hpp>
0015 #include <boost/core/detail/string_view.hpp>
0016 #include <boost/url/url.hpp>
0017 
0018 namespace boost {
0019 namespace urls {
0020 namespace detail {
0021 
0022 inline
0023 void
0024 vformat_to(
0025     url_base& u,
0026     core::string_view fmt,
0027     detail::format_args args)
0028 {
0029     parse_pattern(fmt)
0030         .value().apply(u, args);
0031 }
0032 
0033 inline
0034 url
0035 vformat(
0036     core::string_view fmt,
0037     detail::format_args args)
0038 {
0039     url u;
0040     vformat_to(u, fmt, args);
0041     return u;
0042 }
0043 
0044 } // detail
0045 } // url
0046 } // boost
0047 
0048 #endif