2
0
mirror of https://github.com/boostorg/url.git synced 2026-02-01 09:02:11 +00:00
Files
url/include/boost/url/rfc/impl/path_abempty.ipp
2021-09-03 17:48:11 -07:00

50 lines
1019 B
C++

//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// 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)
//
// Official repository: https://github.com/CPPAlliance/url
//
#ifndef BOOST_URL_RFC_IMPL_PATH_ABEMPTY_IPP
#define BOOST_URL_RFC_IMPL_PATH_ABEMPTY_IPP
#include <boost/url/rfc/path_abempty.hpp>
#include <boost/url/error.hpp>
#include <boost/url/string.hpp>
#include <boost/url/bnf/literal.hpp>
#include <boost/url/rfc/segment.hpp>
namespace boost {
namespace urls {
namespace rfc {
char const*
path_abempty::
increment(
char const* const start,
char const* const end,
error_code& ec)
{
segment t;
using bnf::parse;
auto it = parse(
start, end, ec, '/', t);
if(ec)
{
v_ = {};
ec = error::end;
return it;
}
v_ = string_view(
start, it - start);
return it;
}
} // rfc
} // urls
} // boost
#endif