LibUnicode: Move Unicode-aware case transformations to a helper file

These will be needed by AK::String as well, so move them to a helper
file where they can be re-used.
This commit is contained in:
Timothy Flynn 2023-01-08 16:28:12 -05:00 committed by Andrew Kaster
commit 12f6793223
Notes: sideshowbarker 2024-07-17 03:27:40 +09:00
6 changed files with 284 additions and 237 deletions

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Error.h>
#include <AK/Forward.h>
#include <AK/Optional.h>
#include <AK/Utf8View.h>
#include <LibUnicode/Forward.h>
namespace Unicode::Detail {
ErrorOr<void> build_lowercase_string(Utf8View code_points, StringBuilder& builder, Optional<StringView> const& locale);
ErrorOr<void> build_uppercase_string(Utf8View code_points, StringBuilder& builder, Optional<StringView> const& locale);
}