AK: Add new String constructor to URL

This commit is contained in:
Kenneth Myhra 2023-02-28 21:35:41 +01:00 committed by Linus Groh
parent c0559e8a10
commit 843c9d6cd7
Notes: sideshowbarker 2024-07-17 06:28:38 +09:00

View File

@ -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; }