Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //
0002 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
0003 // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
0004 //
0005 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0006 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 //
0008 // Official repository: https://github.com/boostorg/url
0009 //
0010 
0011 #ifndef BOOST_URL_PARSE_PATH_HPP
0012 #define BOOST_URL_PARSE_PATH_HPP
0013 
0014 #include <boost/url/detail/config.hpp>
0015 #include <boost/url/error_types.hpp>
0016 #include <boost/url/segments_encoded_view.hpp>
0017 
0018 namespace boost {
0019 namespace urls {
0020 
0021 /** Parse a string and return an encoded segment view
0022 
0023     This function parses the string and returns the
0024     corresponding path object if the string is valid,
0025     otherwise returns an error.
0026 
0027     @par BNF
0028     @code
0029     path          = [ "/" ] segment *( "/" segment )
0030     @endcode
0031 
0032     @par Exception Safety
0033     No-throw guarantee.
0034 
0035     @return A valid view on success, otherwise an
0036     error code.
0037 
0038     @param s The string to parse
0039 
0040     @par Specification
0041     @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3.3"
0042         >3.3.  Path (rfc3986)</a>
0043 
0044     @see
0045         @ref segments_encoded_view.
0046 */
0047 BOOST_URL_DECL
0048 system::result<segments_encoded_view>
0049 parse_path(core::string_view s) noexcept;
0050 
0051 } // urls
0052 } // boost
0053 
0054 #endif