mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
AK: Add new String constructor to URL
This commit is contained in:
parent
c0559e8a10
commit
843c9d6cd7
1 changed files with 5 additions and 0 deletions
5
AK/URL.h
5
AK/URL.h
|
@ -8,6 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/DeprecatedString.h>
|
#include <AK/DeprecatedString.h>
|
||||||
|
#include <AK/String.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
|
||||||
|
@ -47,6 +48,10 @@ public:
|
||||||
: URL(string.view())
|
: URL(string.view())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
URL(String const& string)
|
||||||
|
: URL(string.bytes_as_string_view())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
bool is_valid() const { return m_valid; }
|
bool is_valid() const { return m_valid; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue