Files
bx/include/bx/url.h
Бранимир Караџић 74e8c2bd91 Happy New Year!
2020-01-14 21:25:09 -08:00

53 lines
693 B
C++

/*
* Copyright 2010-2020 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bx#license-bsd-2-clause
*/
#ifndef BX_URL_H_HEADER_GUARD
#define BX_URL_H_HEADER_GUARD
#include "string.h"
namespace bx
{
///
class UrlView
{
public:
enum Enum
{
Scheme,
UserName,
Password,
Host,
Port,
Path,
Query,
Fragment,
Count
};
///
UrlView();
///
void clear();
///
bool parse(const StringView& _url);
///
const StringView& get(Enum _token) const;
private:
StringView m_tokens[Count];
};
///
void urlEncode(char* _out, uint32_t _max, const StringView& _str);
} // namespace bx
#endif // BX_URL_H_HEADER_GUARD