2025-03-07 18:53:07 +13:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2025, Shannon Booth <shannon@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/String.h>
|
2025-03-18 19:00:45 +13:00
|
|
|
#include <LibURL/Pattern/Options.h>
|
|
|
|
#include <LibURL/Pattern/Part.h>
|
2025-03-07 18:53:07 +13:00
|
|
|
|
|
|
|
namespace URL::Pattern {
|
|
|
|
|
2025-03-18 19:00:45 +13:00
|
|
|
// https://urlpattern.spec.whatwg.org/#full-wildcard-regexp-value
|
|
|
|
static inline constexpr auto full_wildcard_regexp_value = ".*"sv;
|
|
|
|
|
2025-03-07 18:53:07 +13:00
|
|
|
String escape_a_pattern_string(String const&);
|
2025-03-18 19:00:45 +13:00
|
|
|
String escape_a_regexp_string(String const&);
|
|
|
|
String generate_a_segment_wildcard_regexp(Options const&);
|
|
|
|
String generate_a_pattern_string(ReadonlySpan<Part>, Options const&);
|
2025-03-07 18:53:07 +13:00
|
|
|
|
|
|
|
}
|