Skip to content

Truly independent web browser

1.1 KB
Raw Blame
/*
 * Copyright (c) 2022-2023, Linus Groh <[email protected]>
 * Copyright (c) 2022, networkException <[email protected]>
 * Copyright (c) 2023, Kenneth Myhra <[email protected]>
 * Copyright (c) 2023, Sam Atkins <[email protected]>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/Forward.h>
#include <AK/String.h>
#include <AK/Utf16String.h>
#include <AK/Utf16View.h>
#include <LibWebCommon/Export.h>

namespace Web::Infra {

WEBCOMMON_API Utf16String normalize_newlines(Utf16String const&);
WEBCOMMON_API Utf16String normalize_newlines(Utf16View);
WEBCOMMON_API ErrorOr<String> strip_and_collapse_whitespace(StringView string);
WEBCOMMON_API Utf16String strip_and_collapse_whitespace(Utf16View string);
WEBCOMMON_API Utf16String strip_and_collapse_whitespace(Utf16String const& string);
WEBCOMMON_API bool is_code_unit_prefix(Utf16View potential_prefix, Utf16View input);
WEBCOMMON_API ErrorOr<Utf16String> convert_to_scalar_value_string(Utf16View string);
WEBCOMMON_API bool code_unit_less_than(Utf16View a, Utf16View b);

}