summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-10 19:31:37 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-10 19:31:37 +0200
commitfb636389d64ee95b62c8316347934f58b6758515 (patch)
tree9d33d423490ed9348cd02701ab900e39f76bc87d
parented43770b2f2f4e988eec730f0b27f03ea02a13f0 (diff)
downloadserenity-fb636389d64ee95b62c8316347934f58b6758515.zip
URL: Add some convenience constructors
-rw-r--r--AK/URL.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/AK/URL.h b/AK/URL.h
index 30a3ec353f..2c17a53190 100644
--- a/AK/URL.h
+++ b/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; }