mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:37:46 +00:00
URL: Add some convenience constructors
This commit is contained in:
parent
ed43770b2f
commit
fb636389d6
1 changed files with 8 additions and 0 deletions
8
AK/URL.h
8
AK/URL.h
|
@ -9,6 +9,14 @@ class URL {
|
|||
public:
|
||||
URL() {}
|
||||
URL(const StringView&);
|
||||
URL(const char* string)
|
||||
: URL(StringView(string))
|
||||
{
|
||||
}
|
||||
URL(const String& string)
|
||||
: URL(string.view())
|
||||
{
|
||||
}
|
||||
|
||||
bool is_valid() const { return m_valid; }
|
||||
String protocol() const { return m_protocol; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue