mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 13:43:45 +03:00
AK: Add new String constructor to URL
This commit is contained in:
parent
c0559e8a10
commit
843c9d6cd7
Notes:
sideshowbarker
2024-07-17 06:28:38 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/843c9d6cd7 Pull-request: https://github.com/SerenityOS/serenity/pull/17686 Reviewed-by: https://github.com/linusg
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 New Issue
Block a user