mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 18:46:18 +00:00
AK: Add new String constructor to URL
This commit is contained in:
parent
c0559e8a10
commit
843c9d6cd7
5
AK/URL.h
5
AK/URL.h
|
@ -8,6 +8,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
|
@ -47,6 +48,10 @@ public:
|
|||
: URL(string.view())
|
||||
{
|
||||
}
|
||||
URL(String const& string)
|
||||
: URL(string.bytes_as_string_view())
|
||||
{
|
||||
}
|
||||
|
||||
bool is_valid() const { return m_valid; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue