Upa URL C++ library
A WHATWG URL Standard implementation
Loading...
Searching...
No Matches
url.h File Reference
#include "buffer.h"
#include "config.h"
#include "str_arg.h"
#include "url_host.h"
#include "url_percent_encode.h"
#include "url_result.h"
#include "url_search_params.h"
#include "url_version.h"
#include "util.h"
#include <algorithm>
#include <array>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <functional>
#include <iterator>
#include <ostream>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>
#include "url_search_params-inl.h"

Go to the source code of this file.

Classes

class  upa::url
 URL class. More...
struct  std::hash< upa::url >
 std::hash specialization for upa::url class More...

Namespaces

namespace  upa
namespace  std

Enumerations

enum class  upa::file_path_format { upa::posix = 1 , upa::windows , upa::native = posix }
 File path format. More...

Functions

bool upa::equals (const url &lhs, const url &rhs, bool exclude_fragments=false)
 URL equivalence.
bool upa::operator== (const url &lhs, const url &rhs)
 Lexicographically compares two URL's.
std::ostream & upa::operator<< (std::ostream &os, const url &url)
 Performs stream output on URL.
void upa::swap (url &lhs, url &rhs) noexcept
 Swaps the contents of two URLs.
template<class StrT, enable_if_str_arg_t< StrT > = 0>
url upa::url_from_file_path (const StrT &str, file_path_format format=file_path_format::native)
 Make URL from OS file path.
url upa::url_from_file_path (const std::filesystem::path &path)
 Make URL from OS file path.
std::string upa::path_from_file_url (const url &file_url, file_path_format format=file_path_format::native)
 Get OS path from file URL.
std::filesystem::path upa::fs_path_from_file_url (const url &file_url)
 Get OS path as std::filesystem::path from file URL.
UPA_API std::uint32_t upa::version_num ()
 Get library version encoded to one number.
bool upa::check_version ()
 Check used library version.