osrm-backend/include/server/api/url_parser.hpp
Daniel Patterson 50d9632ed7
Upgrade formatting to clang-format 10 (#5895)
* Update formatting tools to clang-format-10

* Reformat using clang-format-10.0.09
2020-11-26 07:21:39 -08:00

30 lines
602 B
C++

#ifndef SERVER_URL_PARSER_HPP
#define SERVER_URL_PARSER_HPP
#include "server/api/parsed_url.hpp"
#include <boost/optional.hpp>
#include <string>
namespace osrm
{
namespace server
{
namespace api
{
// Starts parsing and iter and modifies it until iter == end or parsing failed
boost::optional<ParsedURL> parseURL(std::string::iterator &iter, const std::string::iterator end);
inline boost::optional<ParsedURL> parseURL(std::string url_string)
{
auto iter = url_string.begin();
return parseURL(iter, url_string.end());
}
} // namespace api
} // namespace server
} // namespace osrm
#endif