/* * Copyright (c) 2022-2023, Linus Groh * Copyright (c) 2022, networkException * Copyright (c) 2023, Kenneth Myhra * Copyright (c) 2023, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Web::Infra { bool is_ascii_case_insensitive_match(StringView a, StringView b); String normalize_newlines(String const&); ErrorOr strip_and_collapse_whitespace(StringView string); bool is_code_unit_prefix(StringView potential_prefix, StringView input); ErrorOr convert_to_scalar_value_string(StringView string); ErrorOr to_ascii_lowercase(StringView string); ErrorOr to_ascii_uppercase(StringView string); ByteBuffer isomorphic_encode(StringView input); String isomorphic_decode(ReadonlyBytes input); bool code_unit_less_than(StringView a, StringView b); }